aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-08-28 12:34:17 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-08-28 12:34:17 +0000
commita292112154f803feb9f5cc002bbfab559f7cb633 (patch)
treead0e10be899398b34764f8f7c0d63df4172a483d /include
parent97af1a64ae6bdddd346d8babfd9f188279dd6644 (diff)
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
Diffstat (limited to 'include')
-rw-r--r--include/core/SkTDLinkedList.h3
-rw-r--r--include/gpu/GrResource.h2
-rw-r--r--include/gpu/SkGpuDevice.h5
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;