| Index: src/gpu/SkGpuDevice.cpp
|
| diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
|
| index 9760968e54970f8259fda84585b560b4575ac9b2..5781a58cf7b8320724909f39fe5b9a84e560ed65 100644
|
| --- a/src/gpu/SkGpuDevice.cpp
|
| +++ b/src/gpu/SkGpuDevice.cpp
|
| @@ -1861,16 +1861,21 @@ bool SkGpuDevice::EXPERIMENTAL_drawPicture(SkCanvas* mainCanvas, const SkPicture
|
| return false;
|
| }
|
|
|
| - SkRect clipBounds;
|
| - if (!mainCanvas->getClipBounds(&clipBounds)) {
|
| - return true;
|
| + const SkLayerInfo *gpuData = static_cast<const SkLayerInfo*>(data);
|
| + if (0 == gpuData->numBlocks()) {
|
| + return false;
|
| }
|
|
|
| - SkAutoCanvasMatrixPaint acmp(mainCanvas, matrix, paint, mainPicture->cullRect());
|
| + SkTDArray<GrHoistedLayer> atlasedNeedRendering, atlasedRecycled;
|
| +
|
| + SkIRect iBounds;
|
| + if (!mainCanvas->getClipDeviceBounds(&iBounds)) {
|
| + return false;
|
| + }
|
|
|
| - const SkMatrix initialMatrix = mainCanvas->getTotalMatrix();
|
| + SkRect clipBounds = SkRect::Make(iBounds);
|
|
|
| - SkTDArray<GrHoistedLayer> atlasedNeedRendering, atlasedRecycled;
|
| + SkMatrix initialMatrix = mainCanvas->getTotalMatrix();
|
|
|
| GrLayerHoister::FindLayersToAtlas(fContext, mainPicture,
|
| initialMatrix,
|
| @@ -1882,6 +1887,8 @@ bool SkGpuDevice::EXPERIMENTAL_drawPicture(SkCanvas* mainCanvas, const SkPicture
|
|
|
| SkTDArray<GrHoistedLayer> needRendering, recycled;
|
|
|
| + SkAutoCanvasMatrixPaint acmp(mainCanvas, matrix, paint, mainPicture->cullRect());
|
| +
|
| GrLayerHoister::FindLayersToHoist(fContext, mainPicture,
|
| initialMatrix,
|
| clipBounds,
|
|
|