diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkTDLinkedList.h | 3 | ||||
-rw-r--r-- | include/gpu/GrResource.h | 2 | ||||
-rw-r--r-- | include/gpu/SkGpuDevice.h | 5 |
3 files changed, 7 insertions, 3 deletions
diff --git a/include/core/SkTDLinkedList.h b/include/core/SkTDLinkedList.h index 7afb5b1b83..88bf96d347 100644 --- a/include/core/SkTDLinkedList.h +++ b/include/core/SkTDLinkedList.h @@ -95,6 +95,9 @@ public: 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 0f4b03d851..6b85729b54 100644 --- a/include/gpu/GrResource.h +++ b/include/gpu/GrResource.h @@ -76,6 +76,8 @@ protected: 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 c2fc186a95..f04be622f1 100644 --- a/include/gpu/SkGpuDevice.h +++ b/include/gpu/SkGpuDevice.h @@ -132,9 +132,8 @@ private: 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; |