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

Side by Side Diff: include/gpu/GrTexture.h

Issue 392333008: Make GrCacheable implement its own ref counting. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove extra blank line Created 6 years, 5 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 | « include/gpu/GrGpuObject.h ('k') | src/gpu/GrContext.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 2011 Google Inc. 3 * Copyright 2011 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 GrTexture_DEFINED 9 #ifndef GrTexture_DEFINED
10 #define GrTexture_DEFINED 10 #define GrTexture_DEFINED
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 kReturnToCache_FlagBit = kFirstBit, 82 kReturnToCache_FlagBit = kFirstBit,
83 }; 83 };
84 84
85 void resetFlag(GrTextureFlags flags) { 85 void resetFlag(GrTextureFlags flags) {
86 fDesc.fFlags = fDesc.fFlags & ~flags; 86 fDesc.fFlags = fDesc.fFlags & ~flags;
87 } 87 }
88 88
89 #ifdef SK_DEBUG 89 #ifdef SK_DEBUG
90 void validate() const { 90 void validate() const {
91 this->INHERITED::validate(); 91 this->INHERITED::validate();
92
93 this->validateDesc(); 92 this->validateDesc();
94 } 93 }
95 #endif 94 #endif
96 95
97 GrTextureImpl* impl() { return reinterpret_cast<GrTextureImpl*>(this); } 96 GrTextureImpl* impl() { return reinterpret_cast<GrTextureImpl*>(this); }
98 const GrTextureImpl* impl() const { return reinterpret_cast<const GrTextureI mpl*>(this); } 97 const GrTextureImpl* impl() const { return reinterpret_cast<const GrTextureI mpl*>(this); }
99 98
100 protected: 99 protected:
101 // A texture refs its rt representation but not vice-versa. It is up to 100 // A texture refs its rt representation but not vice-versa. It is up to
102 // the subclass constructor to initialize this pointer. 101 // the subclass constructor to initialize this pointer.
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 fTexture.reset(SkSafeRef(texture)); 211 fTexture.reset(SkSafeRef(texture));
213 return texture; 212 return texture;
214 } 213 }
215 214
216 private: 215 private:
217 SkAutoTUnref<GrTexture> fTexture; 216 SkAutoTUnref<GrTexture> fTexture;
218 SkIPoint fOffset; 217 SkIPoint fOffset;
219 }; 218 };
220 219
221 #endif 220 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrGpuObject.h ('k') | src/gpu/GrContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698