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 27 matching lines...) Expand all Loading... |
38 this->INHERITED::validate(); | 38 this->INHERITED::validate(); |
39 this->validateDesc(); | 39 this->validateDesc(); |
40 } | 40 } |
41 #endif | 41 #endif |
42 | 42 |
43 /** Access methods that are only to be used within Skia code. */ | 43 /** Access methods that are only to be used within Skia code. */ |
44 inline GrTexturePriv texturePriv(); | 44 inline GrTexturePriv texturePriv(); |
45 inline const GrTexturePriv texturePriv() const; | 45 inline const GrTexturePriv texturePriv() const; |
46 | 46 |
47 protected: | 47 protected: |
48 GrTexture(GrGpu*, LifeCycle, const GrSurfaceDesc&); | 48 GrTexture(GrGpu*, LifeCycle, const GrSurfaceDesc&, bool wasMipMapDataProvide
d); |
49 | 49 |
50 void validateDesc() const; | 50 void validateDesc() const; |
51 | 51 |
52 private: | 52 private: |
53 size_t onGpuMemorySize() const override; | 53 size_t onGpuMemorySize() const override; |
54 void dirtyMipMaps(bool mipMapsDirty); | 54 void dirtyMipMaps(bool mipMapsDirty); |
55 | 55 |
56 enum MipMapsStatus { | 56 enum MipMapsStatus { |
57 kNotAllocated_MipMapsStatus, | 57 kNotAllocated_MipMapsStatus, |
58 kAllocated_MipMapsStatus, | 58 kAllocated_MipMapsStatus, |
59 kValid_MipMapsStatus | 59 kValid_MipMapsStatus |
60 }; | 60 }; |
61 | 61 |
62 MipMapsStatus fMipMapsStatus; | 62 MipMapsStatus fMipMapsStatus; |
| 63 int fMaxMipMapLevel; |
63 | 64 |
64 friend class GrTexturePriv; | 65 friend class GrTexturePriv; |
65 | 66 |
66 typedef GrSurface INHERITED; | 67 typedef GrSurface INHERITED; |
67 }; | 68 }; |
68 | 69 |
69 #endif | 70 #endif |
OLD | NEW |