Reduce dependence on GrSurface's origin field (take 3)
TBR=bsalomon@google.com
Change-Id: I8c95c6774897dbd87e3c5c87d92f75c5b64d4e76
Reviewed-on: https://skia-review.googlesource.com/26424
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/GrTextureMaker.cpp b/src/gpu/GrTextureMaker.cpp
index 96bcea4..2962ddb 100644
--- a/src/gpu/GrTextureMaker.cpp
+++ b/src/gpu/GrTextureMaker.cpp
@@ -41,18 +41,17 @@
}
}
- SkDEBUGCODE(GrSurfaceOrigin origOrigin);
+ GrSurfaceOrigin origOrigin;
GrUniqueKey copyKey;
this->makeCopyKey(copyParams, ©Key, dstColorSpace);
if (copyKey.isValid()) {
-#ifdef SK_DEBUG
if (original) {
origOrigin = original->origin();
} else {
origOrigin = kTopLeft_GrSurfaceOrigin;
}
-#endif
- sk_sp<GrTextureProxy> result(fContext->resourceProvider()->findProxyByUniqueKey(copyKey));
+ sk_sp<GrTextureProxy> result(fContext->resourceProvider()->findProxyByUniqueKey(
+ copyKey, origOrigin));
if (result) {
return result;
}