Remove SkGpuDevice::fTexture, use new pixel ref class name

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


git-svn-id: http://skia.googlecode.com/svn/trunk@5307 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/include/core/SkTDLinkedList.h b/include/core/SkTDLinkedList.h
index 7afb5b1..88bf96d 100644
--- a/include/core/SkTDLinkedList.h
+++ b/include/core/SkTDLinkedList.h
@@ -95,6 +95,9 @@
         return NULL == fHead && NULL == fTail;
     }
 
+    T* head() { return fHead; }
+    T* tail() { return fTail; }
+
     class Iter {
     public:
         enum IterStart {
diff --git a/include/gpu/GrResource.h b/include/gpu/GrResource.h
index 0f4b03d..6b85729 100644
--- a/include/gpu/GrResource.h
+++ b/include/gpu/GrResource.h
@@ -76,6 +76,8 @@
     virtual void onRelease() = 0;
     virtual void onAbandon() = 0;
 
+    bool isInCache() const { return NULL != fCacheEntry; }
+
 private:
 
     friend class GrGpu; // GrGpu manages list of resources.
diff --git a/include/gpu/SkGpuDevice.h b/include/gpu/SkGpuDevice.h
index c2fc186..f04be62 100644
--- a/include/gpu/SkGpuDevice.h
+++ b/include/gpu/SkGpuDevice.h
@@ -132,9 +132,8 @@
     GrClipData      fClipData;
 
     // state for our offscreen render-target
-    // TODO: remove 'fCached' and let fTexture automatically return to the cache
-    bool                fCached;        // is fTexture in the cache
-    GrTexture*          fTexture;
+    // TODO: remove 'fCached' and automatically return to the cache
+    bool                fCached;        // is fRenderTarget->asTexture() in the cache
     GrRenderTarget*     fRenderTarget;
     bool                fNeedClear;
     bool                fNeedPrepareRenderTarget;