aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrTextureAdjuster.cpp
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2017-09-26 12:49:26 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-09-26 17:11:21 +0000
commitcd871401114f402e72420ccd49edecee2532b0e6 (patch)
treea323510790f271cc2e0a85487ab52cbc7ffc9339 /src/gpu/GrTextureAdjuster.cpp
parent98a6216b18b57c2f7a0d58f542c60503686aed69 (diff)
Add ability to remove unique key from proxy and underlying surface.
Bug: skia: Change-Id: I66b891ce9ca35906fdbddb36f565b35b25825112 Reviewed-on: https://skia-review.googlesource.com/51240 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrTextureAdjuster.cpp')
-rw-r--r--src/gpu/GrTextureAdjuster.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gpu/GrTextureAdjuster.cpp b/src/gpu/GrTextureAdjuster.cpp
index 9c34cca569..a06c64f335 100644
--- a/src/gpu/GrTextureAdjuster.cpp
+++ b/src/gpu/GrTextureAdjuster.cpp
@@ -46,8 +46,9 @@ sk_sp<GrTextureProxy> GrTextureAdjuster::refTextureProxyCopy(const CopyParams& c
GrUniqueKey key;
this->makeCopyKey(copyParams, &key, nullptr);
if (key.isValid()) {
- sk_sp<GrTextureProxy> cachedCopy = fContext->resourceProvider()->findProxyByUniqueKey(
- key, this->originalProxy()->origin());
+ sk_sp<GrTextureProxy> cachedCopy =
+ fContext->resourceProvider()->findOrCreateProxyByUniqueKey(
+ key, this->originalProxy()->origin());
if (cachedCopy) {
return cachedCopy;
}