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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 | 156 |
157 static GrResourceKey ComputeKey(const GrGpu* gpu, | 157 static GrResourceKey ComputeKey(const GrGpu* gpu, |
158 const GrTextureParams* params, | 158 const GrTextureParams* params, |
159 const GrTextureDesc& desc, | 159 const GrTextureDesc& desc, |
160 const GrCacheID& cacheID); | 160 const GrCacheID& cacheID); |
161 static GrResourceKey ComputeScratchKey(const GrTextureDesc& desc); | 161 static GrResourceKey ComputeScratchKey(const GrTextureDesc& desc); |
162 static bool NeedsResizing(const GrResourceKey& key); | 162 static bool NeedsResizing(const GrResourceKey& key); |
163 static bool NeedsBilerp(const GrResourceKey& key); | 163 static bool NeedsBilerp(const GrResourceKey& key); |
164 | 164 |
165 protected: | 165 protected: |
166 GrTextureImpl(GrGpu* gpu, bool isWrapped, const GrTextureDesc& desc) | 166 GrTextureImpl(GrGpu* gpu, bool isWrapped, const GrTextureDesc& desc); |
167 : INHERITED(gpu, isWrapped, desc) | |
168 , fMipMapsStatus(kNotAllocated_MipMapsStatus) { | |
169 } | |
170 | 167 |
171 private: | 168 private: |
172 enum MipMapsStatus { | 169 enum MipMapsStatus { |
173 kNotAllocated_MipMapsStatus, | 170 kNotAllocated_MipMapsStatus, |
174 kAllocated_MipMapsStatus, | 171 kAllocated_MipMapsStatus, |
175 kValid_MipMapsStatus | 172 kValid_MipMapsStatus |
176 }; | 173 }; |
177 | 174 |
178 MipMapsStatus fMipMapsStatus; | 175 MipMapsStatus fMipMapsStatus; |
179 | 176 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 fTexture.reset(SkSafeRef(texture)); | 210 fTexture.reset(SkSafeRef(texture)); |
214 return texture; | 211 return texture; |
215 } | 212 } |
216 | 213 |
217 private: | 214 private: |
218 SkAutoTUnref<GrTexture> fTexture; | 215 SkAutoTUnref<GrTexture> fTexture; |
219 SkIPoint fOffset; | 216 SkIPoint fOffset; |
220 }; | 217 }; |
221 | 218 |
222 #endif | 219 #endif |
OLD | NEW |