| Index: src/gpu/SkGpuDevice.cpp
|
| diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
|
| index cb532feb6b586790ca142fc09a56967aa15551da..f8b372417eeb03700a16fef63d1d3439cc285d98 100644
|
| --- a/src/gpu/SkGpuDevice.cpp
|
| +++ b/src/gpu/SkGpuDevice.cpp
|
| @@ -758,16 +758,12 @@ bool SkGpuDevice::shouldTileImageID(uint32_t imageID, const SkIRect& imageRect,
|
| return true;
|
| }
|
|
|
| + // If the image would only produce 4 tiles of the smaller size, don't bother tiling it.
|
| const size_t area = imageRect.width() * imageRect.height();
|
| if (area < 4 * kBmpSmallTileSize * kBmpSmallTileSize) {
|
| return false;
|
| }
|
|
|
| - // if the entire image/bitmap is already in our cache then no reason to tile it
|
| - if (GrIsImageInCache(fContext, imageID, imageRect, nullptr, params)) {
|
| - return false;
|
| - }
|
| -
|
| // At this point we know we could do the draw by uploading the entire bitmap
|
| // as a texture. However, if the texture would be large compared to the
|
| // cache size and we don't require most of it for this draw then tile to
|
| @@ -782,7 +778,8 @@ bool SkGpuDevice::shouldTileImageID(uint32_t imageID, const SkIRect& imageRect,
|
| return false;
|
| }
|
|
|
| - // Figure out how much of the src we will need based on the src rect and clipping.
|
| + // Figure out how much of the src we will need based on the src rect and clipping. Reject if
|
| + // tiling memory savings would be < 50%.
|
| determine_clipped_src_rect(fRenderTarget, fClip, viewMatrix, imageRect.size(), srcRectPtr,
|
| clippedSubset);
|
| *tileSize = kBmpSmallTileSize; // already know whole bitmap fits in one max sized tile.
|
|
|