Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(430)

Side by Side Diff: src/gpu/GrGpuResourceCacheAccess.h

Issue 902873002: Reimplement gpu message bus for invalidated bitmap gen IDs (Closed) Base URL: https://skia.googlesource.com/skia.git@one_tex
Patch Set: fix speeling error Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/gpu/GrGpuResource.cpp ('k') | src/gpu/GrLayerCache.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2014 Google Inc. 3 * Copyright 2014 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #ifndef GrGpuResourceCacheAccess_DEFINED 9 #ifndef GrGpuResourceCacheAccess_DEFINED
10 #define GrGpuResourceCacheAccess_DEFINED 10 #define GrGpuResourceCacheAccess_DEFINED
(...skipping 10 matching lines...) Expand all
21 * Sets a content key for the resource. If the resource was previously cache d as scratch it will 21 * Sets a content key for the resource. If the resource was previously cache d as scratch it will
22 * be converted to a content resource. Currently this may only be called onc e per resource. It 22 * be converted to a content resource. Currently this may only be called onc e per resource. It
23 * fails if there is already a resource with the same content key. TODO: mak e this supplant the 23 * fails if there is already a resource with the same content key. TODO: mak e this supplant the
24 * resource that currently is using the content key, allow resources' conten t keys to change, 24 * resource that currently is using the content key, allow resources' conten t keys to change,
25 * and allow removal of a content key to convert a resource back to scratch. 25 * and allow removal of a content key to convert a resource back to scratch.
26 */ 26 */
27 bool setContentKey(const GrContentKey& contentKey) { 27 bool setContentKey(const GrContentKey& contentKey) {
28 return fResource->setContentKey(contentKey); 28 return fResource->setContentKey(contentKey);
29 } 29 }
30 30
31 void removeContentKey() { return fResource->removeContentKey(); }
32
31 /** 33 /**
32 * Is the resource currently cached as scratch? This means it is cached, has a valid scratch 34 * Is the resource currently cached as scratch? This means it is cached, has a valid scratch
33 * key, and does not have a content key. 35 * key, and does not have a content key.
34 */ 36 */
35 bool isScratch() const { 37 bool isScratch() const {
36 return !fResource->getContentKey().isValid() && fResource->fScratchKey.i sValid() && 38 return !fResource->getContentKey().isValid() && fResource->fScratchKey.i sValid() &&
37 this->isBudgeted(); 39 this->isBudgeted();
38 } 40 }
39 41
40 /** 42 /**
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 friend class GrGpuResource; // to construct/copy this type. 112 friend class GrGpuResource; // to construct/copy this type.
111 }; 113 };
112 114
113 inline GrGpuResource::CacheAccess GrGpuResource::cacheAccess() { return CacheAcc ess(this); } 115 inline GrGpuResource::CacheAccess GrGpuResource::cacheAccess() { return CacheAcc ess(this); }
114 116
115 inline const GrGpuResource::CacheAccess GrGpuResource::cacheAccess() const { 117 inline const GrGpuResource::CacheAccess GrGpuResource::cacheAccess() const {
116 return CacheAccess(const_cast<GrGpuResource*>(this)); 118 return CacheAccess(const_cast<GrGpuResource*>(this));
117 } 119 }
118 120
119 #endif 121 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrGpuResource.cpp ('k') | src/gpu/GrLayerCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698