michael@0: /* michael@0: * Copyright 2014 Google Inc. michael@0: * michael@0: * Use of this source code is governed by a BSD-style license that can be michael@0: * found in the LICENSE file. michael@0: */ michael@0: michael@0: #include "SkGatherPixelRefsAndRects.h" michael@0: #include "SkNoSaveLayerCanvas.h" michael@0: #include "SkPictureUtils.h" michael@0: michael@0: void SkPictureUtils::GatherPixelRefsAndRects(SkPicture* pict, michael@0: SkPictureUtils::SkPixelRefContainer* prCont) { michael@0: if (0 == pict->width() || 0 == pict->height()) { michael@0: return ; michael@0: } michael@0: michael@0: SkGatherPixelRefsAndRectsDevice device(pict->width(), pict->height(), prCont); michael@0: SkNoSaveLayerCanvas canvas(&device); michael@0: michael@0: canvas.clipRect(SkRect::MakeWH(SkIntToScalar(pict->width()), michael@0: SkIntToScalar(pict->height())), michael@0: SkRegion::kIntersect_Op, false); michael@0: canvas.drawPicture(*pict); michael@0: }