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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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&); |
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); | |
bsalomon
2015/09/15 13:14:10
What happens if we draw to the base of a texture t
cblume
2015/09/16 18:40:46
You are right. Last night, while writing this, I t
| |
55 | 54 |
56 enum MipMapsStatus { | 55 enum MipMapsStatus { |
57 kNotAllocated_MipMapsStatus, | 56 kNotAllocated_MipMapsStatus, |
58 kAllocated_MipMapsStatus, | 57 kAllocated_MipMapsStatus |
59 kValid_MipMapsStatus | |
60 }; | 58 }; |
61 | 59 |
62 MipMapsStatus fMipMapsStatus; | 60 MipMapsStatus fMipMapsStatus; |
63 // These two shift a fixed-point value into normalized coordinates» | 61 // These two shift a fixed-point value into normalized coordinates |
64 // for this texture if the texture is power of two sized. | 62 // for this texture if the texture is power of two sized. |
65 int fShiftFixedX; | 63 int fShiftFixedX; |
66 int fShiftFixedY; | 64 int fShiftFixedY; |
67 | 65 |
68 friend class GrTexturePriv; | 66 friend class GrTexturePriv; |
69 | 67 |
70 typedef GrSurface INHERITED; | 68 typedef GrSurface INHERITED; |
71 }; | 69 }; |
72 | 70 |
73 #endif | 71 #endif |
OLD | NEW |