From cd871401114f402e72420ccd49edecee2532b0e6 Mon Sep 17 00:00:00 2001 From: Greg Daniel Date: Tue, 26 Sep 2017 12:49:26 -0400 Subject: 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 Reviewed-by: Robert Phillips --- src/gpu/SkGr.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/gpu/SkGr.cpp') diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp index b9f75e0821..7f956d67d2 100644 --- a/src/gpu/SkGr.cpp +++ b/src/gpu/SkGr.cpp @@ -256,7 +256,8 @@ sk_sp GrMakeCachedBitmapProxy(GrResourceProvider* resourceProvid sk_sp proxy; if (originalKey.isValid()) { - proxy = resourceProvider->findProxyByUniqueKey(originalKey, kTopLeft_GrSurfaceOrigin); + proxy = resourceProvider->findOrCreateProxyByUniqueKey(originalKey, + kTopLeft_GrSurfaceOrigin); } if (!proxy) { // Pass nullptr for |dstColorSpace|. This is lenient - we allow a wider range of -- cgit v1.2.3