| Index: src/gpu/SkGpuDevice.cpp
|
| diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
|
| index b072142a0bd6383520be33a4bc0357f76471289c..06f6eb7778fd8dd925af8fc5683ab924ed4b0f92 100644
|
| --- a/src/gpu/SkGpuDevice.cpp
|
| +++ b/src/gpu/SkGpuDevice.cpp
|
| @@ -1789,25 +1789,6 @@ SkSurface* SkGpuDevice::newSurface(const SkImageInfo& info, const SkSurfaceProps
|
| return SkSurface::NewRenderTarget(fContext, info, fRenderTarget->numSamples(), &props);
|
| }
|
|
|
| -void SkGpuDevice::EXPERIMENTAL_optimize(const SkPicture* picture) {
|
| - fContext->getLayerCache()->processDeletedPictures();
|
| -
|
| - if (picture->fData.get() && !picture->fData->suitableForLayerOptimization()) {
|
| - return;
|
| - }
|
| -
|
| - SkPicture::AccelData::Key key = GrAccelData::ComputeAccelDataKey();
|
| -
|
| - const SkPicture::AccelData* existing = picture->EXPERIMENTAL_getAccelData(key);
|
| - if (existing) {
|
| - return;
|
| - }
|
| -
|
| - GPUOptimize(picture);
|
| -
|
| - fContext->getLayerCache()->trackPicture(picture);
|
| -}
|
| -
|
| bool SkGpuDevice::EXPERIMENTAL_drawPicture(SkCanvas* mainCanvas, const SkPicture* mainPicture,
|
| const SkMatrix* matrix, const SkPaint* paint) {
|
| // todo: should handle these natively
|
| @@ -1815,6 +1796,13 @@ bool SkGpuDevice::EXPERIMENTAL_drawPicture(SkCanvas* mainCanvas, const SkPicture
|
| return false;
|
| }
|
|
|
| + SkPicture::AccelData::Key key = GrAccelData::ComputeAccelDataKey();
|
| +
|
| + const SkPicture::AccelData* data = mainPicture->EXPERIMENTAL_getAccelData(key);
|
| + if (!data) {
|
| + return false;
|
| + }
|
| +
|
| SkRect clipBounds;
|
| if (!mainCanvas->getClipBounds(&clipBounds)) {
|
| return true;
|
|
|