diff options
author | Greg Daniel <egdaniel@google.com> | 2018-03-14 17:22:20 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-03-14 17:22:32 +0000 |
commit | 4f57eb8002a0488cfbf08717b25af93fae37a39a (patch) | |
tree | 2266ed981844c8a97f933917f5635170a457e51d | |
parent | 2f2419b936150e24ca1aea891ba405c8ea8ebdc7 (diff) |
Revert "Add back missing unique key checks when creating CachedBitmap/Image Proxies"
This reverts commit b78dd5d01eb16ae3cb9104ce8c0fa7e861431259.
Reason for revert: possibly breaking chrome roll
Original change's description:
> Add back missing unique key checks when creating CachedBitmap/Image Proxies
>
> Its possible that this could fix perf regression in Chrome.
>
> Bug: 811452
> Change-Id: I2d4f7827092b361469586580f0c7c843ab2d5cec
> Reviewed-on: https://skia-review.googlesource.com/114280
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com
Change-Id: I71646befd07bf28442ac3b9225c021cd141bf398
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 811452
Reviewed-on: https://skia-review.googlesource.com/114422
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
-rw-r--r-- | src/gpu/SkGr.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp index 195d036374..4701483af5 100644 --- a/src/gpu/SkGr.cpp +++ b/src/gpu/SkGr.cpp @@ -178,11 +178,9 @@ static void create_unique_key_for_image(const SkImage* image, GrUniqueKey* resul } if (const SkBitmap* bm = as_IB(image)->onPeekBitmap()) { - if (!bm->isVolatile()) { - SkIPoint origin = bm->pixelRefOrigin(); - SkIRect subset = SkIRect::MakeXYWH(origin.fX, origin.fY, bm->width(), bm->height()); - GrMakeKeyFromImageID(result, bm->getGenerationID(), subset); - } + SkIPoint origin = bm->pixelRefOrigin(); + SkIRect subset = SkIRect::MakeXYWH(origin.fX, origin.fY, bm->width(), bm->height()); + GrMakeKeyFromImageID(result, bm->getGenerationID(), subset); return; } @@ -201,13 +199,10 @@ sk_sp<GrTextureProxy> GrMakeCachedImageProxy(GrProxyProvider* proxyProvider, proxy = proxyProvider->findOrCreateProxyByUniqueKey(originalKey, kTopLeft_GrSurfaceOrigin); } if (!proxy) { - proxy = proxyProvider->createTextureProxy(srcImage, kNone_GrSurfaceFlags, 1, + proxy = proxyProvider->createTextureProxy(std::move(srcImage), kNone_GrSurfaceFlags, 1, SkBudgeted::kYes, fit); if (proxy && originalKey.isValid()) { proxyProvider->assignUniqueKeyToProxy(originalKey, proxy.get()); - if (const SkBitmap* bm = as_IB(srcImage.get())->onPeekBitmap()) { - GrInstallBitmapUniqueKeyInvalidator(originalKey, bm->pixelRef()); - } } } |