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; |
102 void dirtyMipMaps(bool mipMapsDirty); | 104 void dirtyMipMaps(bool mipMapsDirty); |
103 | 105 |
104 enum MipMapsStatus { | 106 enum MipMapsStatus { |
105 kNotAllocated_MipMapsStatus, | 107 kNotAllocated_MipMapsStatus, |
106 kAllocated_MipMapsStatus, | 108 kAllocated_MipMapsStatus, |
107 kValid_MipMapsStatus | 109 kValid_MipMapsStatus |
108 }; | 110 }; |
109 | 111 |
110 MipMapsStatus fMipMapsStatus; | 112 MipMapsStatus fMipMapsStatus; |
111 // These two shift a fixed-point value into normalized coordinates | 113 // These two shift a fixed-point value into normalized coordinates |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 fTexture.reset(SkSafeRef(texture)); | 153 fTexture.reset(SkSafeRef(texture)); |
152 return texture; | 154 return texture; |
153 } | 155 } |
154 | 156 |
155 private: | 157 private: |
156 SkAutoTUnref<GrTexture> fTexture; | 158 SkAutoTUnref<GrTexture> fTexture; |
157 SkIPoint fOffset; | 159 SkIPoint fOffset; |
158 }; | 160 }; |
159 | 161 |
160 #endif | 162 #endif |
OLD | NEW |