OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |