Second small fragment from "Reduce dependence on GrSurface's origin field"

TBR=bsalomon@google.com
Change-Id: Ifcfe56b1117b64821b2bfc34ba36d120227d15fa
Reviewed-on: https://skia-review.googlesource.com/25802
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/effects/GrTextureStripAtlas.cpp b/src/gpu/effects/GrTextureStripAtlas.cpp
index 72817b2..d0c6e47 100644
--- a/src/gpu/effects/GrTextureStripAtlas.cpp
+++ b/src/gpu/effects/GrTextureStripAtlas.cpp
@@ -193,11 +193,6 @@
 }
 
 void GrTextureStripAtlas::lockTexture() {
-    GrSurfaceDesc texDesc;
-    texDesc.fOrigin = kTopLeft_GrSurfaceOrigin;
-    texDesc.fWidth = fDesc.fWidth;
-    texDesc.fHeight = fDesc.fHeight;
-    texDesc.fConfig = fDesc.fConfig;
 
     static const GrUniqueKey::Domain kDomain = GrUniqueKey::GenerateDomain();
     GrUniqueKey key;
@@ -207,6 +202,12 @@
 
     sk_sp<GrTextureProxy> proxy = fDesc.fContext->resourceProvider()->findProxyByUniqueKey(key);
     if (!proxy) {
+        GrSurfaceDesc texDesc;
+        texDesc.fOrigin = kTopLeft_GrSurfaceOrigin;
+        texDesc.fWidth  = fDesc.fWidth;
+        texDesc.fHeight = fDesc.fHeight;
+        texDesc.fConfig = fDesc.fConfig;
+
         proxy = GrSurfaceProxy::MakeDeferred(fDesc.fContext->resourceProvider(),
                                              texDesc, SkBackingFit::kExact,
                                              SkBudgeted::kYes,
@@ -215,6 +216,7 @@
             return;
         }
 
+        SkASSERT(proxy->origin() == kTopLeft_GrSurfaceOrigin);
         fDesc.fContext->resourceProvider()->assignUniqueKeyToProxy(key, proxy.get());
         // This is a new texture, so all of our cache info is now invalid
         this->initLRU();