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 28 matching lines...) Expand all Loading... | |
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&); |
49 GrTexture(GrGpu*, LifeCycle, const GrSurfaceDesc&, bool wasMipMapDataProvide d); | |
49 | 50 |
50 void validateDesc() const; | 51 void validateDesc() const; |
51 | 52 |
52 private: | 53 private: |
53 size_t onGpuMemorySize() const override; | 54 size_t onGpuMemorySize() const override; |
54 void dirtyMipMaps(bool mipMapsDirty); | 55 void dirtyMipMaps(bool mipMapsDirty); |
55 | 56 |
56 enum MipMapsStatus { | 57 enum MipMapsStatus { |
57 kNotAllocated_MipMapsStatus, | 58 kNotAllocated_MipMapsStatus, |
58 kAllocated_MipMapsStatus, | 59 kAllocated_MipMapsStatus, |
59 kValid_MipMapsStatus | 60 kValid_MipMapsStatus |
60 }; | 61 }; |
61 | 62 |
62 MipMapsStatus fMipMapsStatus; | 63 MipMapsStatus fMipMapsStatus; |
63 // These two shift a fixed-point value into normalized coordinates» | 64 bool fIsMaxMipMapLevelSpecified; |
65 int fMaxMipMapLevel; | |
bsalomon
2016/01/14 13:57:23
Could this be combined with the Desc's boolean? Ma
Chris Blume
2016/01/20 06:15:08
Done.
| |
66 // These two shift a fixed-point value into normalized coordinates | |
64 // for this texture if the texture is power of two sized. | 67 // for this texture if the texture is power of two sized. |
65 int fShiftFixedX; | 68 int fShiftFixedX; |
66 int fShiftFixedY; | 69 int fShiftFixedY; |
67 | 70 |
68 friend class GrTexturePriv; | 71 friend class GrTexturePriv; |
69 | 72 |
70 typedef GrSurface INHERITED; | 73 typedef GrSurface INHERITED; |
71 }; | 74 }; |
72 | 75 |
73 #endif | 76 #endif |
OLD | NEW |