In SkGPipeCanvas, rename fSharedHeap to fBitmapHeap

to reflect the fact that it is only used for storing bitmaps.

Review URL: https://codereview.appspot.com/6446134

git-svn-id: http://skia.googlecode.com/svn/trunk@5085 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/pipe/SkGPipeWrite.cpp b/src/pipe/SkGPipeWrite.cpp
index 119a809..f5401aa 100644
--- a/src/pipe/SkGPipeWrite.cpp
+++ b/src/pipe/SkGPipeWrite.cpp
@@ -168,16 +168,16 @@
                 this->writeOp(kDone_DrawOp);
                 this->doNotify();
                 if (shouldFlattenBitmaps(fFlags)) {
-                    // In this case, a BitmapShuttle is reffed by the SharedHeap
-                    // and refs this canvas. Unref the SharedHeap to end the
+                    // In this case, a BitmapShuttle is reffed by the SkBitmapHeap
+                    // and refs this canvas. Unref the SkBitmapHeap to end the
                     // circular reference. When shouldFlattenBitmaps is false,
-                    // there is no circular reference, so the SharedHeap can be
+                    // there is no circular reference, so the SkBitmapHeap can be
                     // safely unreffed in the destructor.
-                    fSharedHeap->unref();
+                    fBitmapHeap->unref();
                     // This eliminates a similar circular reference (Canvas owns
-                    // the FlattenableHeap which holds a ref to fSharedHeap).
+                    // the FlattenableHeap which holds a ref to the SkBitmapHeap).
                     fFlattenableHeap.setBitmapStorage(NULL);
-                    fSharedHeap = NULL;
+                    fBitmapHeap = NULL;
                 }
             }
             fDone = true;
@@ -188,7 +188,7 @@
     size_t freeMemoryIfPossible(size_t bytesToFree);
 
     size_t storageAllocatedForRecording() {
-        return fSharedHeap->bytesAllocated();
+        return fBitmapHeap->bytesAllocated();
     }
 
     // overrides from SkCanvas
@@ -253,7 +253,7 @@
     };
     SkNamedFactorySet* fFactorySet;
     int                fFirstSaveLayerStackLevel;
-    SkBitmapHeap*      fSharedHeap;
+    SkBitmapHeap*      fBitmapHeap;
     SkGPipeController* fController;
     SkWriter32&        fWriter;
     size_t             fBlockSize; // amount allocated for writer
@@ -356,11 +356,11 @@
         writeBufferFlags = 0;
     }
 
-    fSharedHeap->deferAddingOwners();
+    fBitmapHeap->deferAddingOwners();
     bool added, replaced;
     const SkFlatData* flat = fFlatDictionary.findAndReplace(
             *obj, writeBufferFlags, fFlattenableHeap.flatToReplace(), &added, &replaced);
-    fSharedHeap->endAddingOwnersDeferral(added);
+    fBitmapHeap->endAddingOwnersDeferral(added);
     int index = flat->index();
     if (added) {
         if (isCrossProcess(fFlags)) {
@@ -431,24 +431,24 @@
     
     if (shouldFlattenBitmaps(flags)) {
         BitmapShuttle* shuttle = SkNEW_ARGS(BitmapShuttle, (this));
-        fSharedHeap = SkNEW_ARGS(SkBitmapHeap, (shuttle, BITMAPS_TO_KEEP));
+        fBitmapHeap = SkNEW_ARGS(SkBitmapHeap, (shuttle, BITMAPS_TO_KEEP));
         shuttle->unref();
     } else {
-        fSharedHeap = SkNEW_ARGS(SkBitmapHeap,
+        fBitmapHeap = SkNEW_ARGS(SkBitmapHeap,
                                  (BITMAPS_TO_KEEP, controller->numberOfReaders()));
         if (this->needOpBytes(sizeof(void*))) {
-            this->writeOp(kShareHeap_DrawOp);
-            fWriter.writePtr(static_cast<void*>(fSharedHeap));
+            this->writeOp(kShareBitmapHeap_DrawOp);
+            fWriter.writePtr(static_cast<void*>(fBitmapHeap));
         }
     }
-    fFlattenableHeap.setBitmapStorage(fSharedHeap);
+    fFlattenableHeap.setBitmapStorage(fBitmapHeap);
     this->doNotify();
 }
 
 SkGPipeCanvas::~SkGPipeCanvas() {
     this->finish();
     SkSafeUnref(fFactorySet);
-    SkSafeUnref(fSharedHeap);
+    SkSafeUnref(fBitmapHeap);
 }
 
 bool SkGPipeCanvas::needOpBytes(size_t needed) {
@@ -706,7 +706,7 @@
                                      unsigned flags,
                                      size_t opBytesNeeded,
                                      const SkPaint* paint) {
-    int32_t bitmapIndex = fSharedHeap->insert(bm);
+    int32_t bitmapIndex = fBitmapHeap->insert(bm);
     if (SkBitmapHeap::INVALID_SLOT == bitmapIndex) {
         return false;
     }
@@ -944,7 +944,7 @@
 }
 
 size_t SkGPipeCanvas::freeMemoryIfPossible(size_t bytesToFree) {
-    return fSharedHeap->freeMemoryIfPossible(bytesToFree);
+    return fBitmapHeap->freeMemoryIfPossible(bytesToFree);
 }
 
 ///////////////////////////////////////////////////////////////////////////////