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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 | 92 |
93 virtual ~GrTexture(); | 93 virtual ~GrTexture(); |
94 | 94 |
95 // GrResource overrides | 95 // GrResource overrides |
96 virtual void onRelease() SK_OVERRIDE; | 96 virtual void onRelease() SK_OVERRIDE; |
97 virtual void onAbandon() SK_OVERRIDE; | 97 virtual void onAbandon() SK_OVERRIDE; |
98 | 98 |
99 void validateDesc() const; | 99 void validateDesc() const; |
100 | 100 |
101 private: | 101 private: |
102 void abandonReleaseCommon(); | |
103 virtual void internal_dispose() const SK_OVERRIDE; | |
104 void dirtyMipMaps(bool mipMapsDirty); | 102 void dirtyMipMaps(bool mipMapsDirty); |
105 | 103 |
106 enum MipMapsStatus { | 104 enum MipMapsStatus { |
107 kNotAllocated_MipMapsStatus, | 105 kNotAllocated_MipMapsStatus, |
108 kAllocated_MipMapsStatus, | 106 kAllocated_MipMapsStatus, |
109 kValid_MipMapsStatus | 107 kValid_MipMapsStatus |
110 }; | 108 }; |
111 | 109 |
112 MipMapsStatus fMipMapsStatus; | 110 MipMapsStatus fMipMapsStatus; |
113 // These two shift a fixed-point value into normalized coordinates | 111 // These two shift a fixed-point value into normalized coordinates |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 fTexture.reset(SkSafeRef(texture)); | 151 fTexture.reset(SkSafeRef(texture)); |
154 return texture; | 152 return texture; |
155 } | 153 } |
156 | 154 |
157 private: | 155 private: |
158 SkAutoTUnref<GrTexture> fTexture; | 156 SkAutoTUnref<GrTexture> fTexture; |
159 SkIPoint fOffset; | 157 SkIPoint fOffset; |
160 }; | 158 }; |
161 | 159 |
162 #endif | 160 #endif |
OLD | NEW |