aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrGpuResourceCacheAccess.h
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2015-01-16 07:32:33 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-01-16 07:32:33 -0800
commitafe3005be3392e43bc51eb7eb2017eefaed85ad1 (patch)
tree3b96ec2e3249a928a0e876140bec3bf3e9dbb13f /src/gpu/GrGpuResourceCacheAccess.h
parentb50ced703030dfbda4fc3ef5e6ec9a52fc0405f8 (diff)
Require budget decision when creating a RenderTarget SkSurface.
Restructure SkGpuDevice creation: *SkSurfaceProps are optional. *Use SkSurfaceProps to communicate DF text rather than a flag. *Tell SkGpuDevice::Create whether RT comes from cache or not. Review URL: https://codereview.chromium.org/848903004
Diffstat (limited to 'src/gpu/GrGpuResourceCacheAccess.h')
-rw-r--r--src/gpu/GrGpuResourceCacheAccess.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gpu/GrGpuResourceCacheAccess.h b/src/gpu/GrGpuResourceCacheAccess.h
index 0aadb89d97..d7c5028b20 100644
--- a/src/gpu/GrGpuResourceCacheAccess.h
+++ b/src/gpu/GrGpuResourceCacheAccess.h
@@ -70,6 +70,12 @@ public:
bool isBudgeted() const { return GrGpuResource::kCached_LifeCycle == fResource->fLifeCycle; }
/**
+ * If the resource is uncached make it cached. Has no effect on resources that are wrapped or
+ * already cached.
+ */
+ void makeBudgeted() { fResource->makeBudgeted(); }
+
+ /**
* Called by the cache to delete the resource under normal circumstances.
*/
void release() {