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

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

Issue 874693002: Fix the speeling of "purgeable" in Gr code (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 11 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/GrResourceCache2.h » ('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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 * If the resource is cached make it uncached. Has no effect on resources th at are wrapped or 79 * If the resource is cached make it uncached. Has no effect on resources th at are wrapped or
80 * already uncached. Furthermore, resources with content keys cannot be made unbudgeted. 80 * already uncached. Furthermore, resources with content keys cannot be made unbudgeted.
81 */ 81 */
82 void makeUnbudgeted() { fResource->makeUnbudgeted(); } 82 void makeUnbudgeted() { fResource->makeUnbudgeted(); }
83 83
84 /** 84 /**
85 * Called by the cache to delete the resource under normal circumstances. 85 * Called by the cache to delete the resource under normal circumstances.
86 */ 86 */
87 void release() { 87 void release() {
88 fResource->release(); 88 fResource->release();
89 if (fResource->isPurgable()) { 89 if (fResource->isPurgeable()) {
90 SkDELETE(fResource); 90 SkDELETE(fResource);
91 } 91 }
92 } 92 }
93 93
94 /** 94 /**
95 * Called by the cache to delete the resource when the backend 3D context is no longer valid. 95 * Called by the cache to delete the resource when the backend 3D context is no longer valid.
96 */ 96 */
97 void abandon() { 97 void abandon() {
98 fResource->abandon(); 98 fResource->abandon();
99 if (fResource->isPurgable()) { 99 if (fResource->isPurgeable()) {
100 SkDELETE(fResource); 100 SkDELETE(fResource);
101 } 101 }
102 } 102 }
103 103
104 private: 104 private:
105 CacheAccess(GrGpuResource* resource) : fResource(resource) { } 105 CacheAccess(GrGpuResource* resource) : fResource(resource) { }
106 CacheAccess(const CacheAccess& that) : fResource(that.fResource) { } 106 CacheAccess(const CacheAccess& that) : fResource(that.fResource) { }
107 CacheAccess& operator=(const CacheAccess&); // unimpl 107 CacheAccess& operator=(const CacheAccess&); // unimpl
108 108
109 // No taking addresses of this type. 109 // No taking addresses of this type.
110 const CacheAccess* operator&() const; 110 const CacheAccess* operator&() const;
111 CacheAccess* operator&(); 111 CacheAccess* operator&();
112 112
113 GrGpuResource* fResource; 113 GrGpuResource* fResource;
114 114
115 friend class GrGpuResource; // to construct/copy this type. 115 friend class GrGpuResource; // to construct/copy this type.
116 }; 116 };
117 117
118 inline GrGpuResource::CacheAccess GrGpuResource::cacheAccess() { return CacheAcc ess(this); } 118 inline GrGpuResource::CacheAccess GrGpuResource::cacheAccess() { return CacheAcc ess(this); }
119 119
120 inline const GrGpuResource::CacheAccess GrGpuResource::cacheAccess() const { 120 inline const GrGpuResource::CacheAccess GrGpuResource::cacheAccess() const {
121 return CacheAccess(const_cast<GrGpuResource*>(this)); 121 return CacheAccess(const_cast<GrGpuResource*>(this));
122 } 122 }
123 123
124 #endif 124 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrGpuResource.cpp ('k') | src/gpu/GrResourceCache2.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698