Reduce dependence on GrSurface's origin field
Unfortunately, GrGPU and its ilk are still using the GrSurface's origin a lot. I will clean that up in a second CL.
Change-Id: Iba729440ce8ea8d24bb7f4e5de55ed576a0f176d
Reviewed-on: https://skia-review.googlesource.com/24700
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/GrBitmapTextureMaker.cpp b/src/gpu/GrBitmapTextureMaker.cpp
index 762b72c..85e791e 100644
--- a/src/gpu/GrBitmapTextureMaker.cpp
+++ b/src/gpu/GrBitmapTextureMaker.cpp
@@ -37,7 +37,8 @@
sk_sp<GrTextureProxy> proxy;
if (fOriginalKey.isValid()) {
- proxy = this->context()->resourceProvider()->findProxyByUniqueKey(fOriginalKey);
+ proxy = this->context()->resourceProvider()->findProxyByUniqueKey(
+ fOriginalKey, kTopLeft_GrSurfaceOrigin);
if (proxy) {
return proxy;
}
@@ -50,6 +51,7 @@
dstColorSpace);
}
if (proxy && fOriginalKey.isValid()) {
+ SkASSERT(proxy->origin() == kTopLeft_GrSurfaceOrigin);
this->context()->resourceProvider()->assignUniqueKeyToProxy(fOriginalKey, proxy.get());
// MDB TODO (caching): this has to play nice with the GrSurfaceProxy's caching
GrInstallBitmapUniqueKeyInvalidator(fOriginalKey, fBitmap.pixelRef());