be sure to use cached bitmap when we need to upload something to make a texture

BUG=skia:4334

Review URL: https://codereview.chromium.org/1338373002
diff --git a/src/core/SkBitmapCache.cpp b/src/core/SkBitmapCache.cpp
index 9f985e5..dfa387b 100644
--- a/src/core/SkBitmapCache.cpp
+++ b/src/core/SkBitmapCache.cpp
@@ -58,6 +58,11 @@
                    sizeof(fGenID) + sizeof(fWidth) + sizeof(fHeight) + sizeof(fBounds));
     }
 
+    void dump() const {
+        SkDebugf("-- add [%d %d] %d [%d %d %d %d]\n", fWidth, fHeight, fGenID,
+                 fBounds.x(), fBounds.y(), fBounds.width(), fBounds.height());
+    }
+
     const uint32_t  fGenID;
     const int       fWidth;
     const int       fHeight;
@@ -69,7 +74,11 @@
               const SkBitmap& result)
         : fKey(genID, width, height, bounds)
         , fBitmap(result)
-    {}
+    {
+#ifdef TRACE_NEW_BITMAP_CACHE_RECS
+        fKey.dump();
+#endif
+    }
 
     const Key& getKey() const override { return fKey; }
     size_t bytesUsed() const override { return sizeof(fKey) + fBitmap.getSize(); }