OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 | 8 |
9 #ifndef GrGLTexture_DEFINED | 9 #ifndef GrGLTexture_DEFINED |
10 #define GrGLTexture_DEFINED | 10 #define GrGLTexture_DEFINED |
11 | 11 |
12 #include "GrGpu.h" | 12 #include "GrGpu.h" |
13 #include "GrTexture.h" | 13 #include "GrTexture.h" |
14 #include "GrGLUtil.h" | 14 #include "GrGLUtil.h" |
15 | 15 |
16 class GrGLGpu; | 16 class GrGLGpu; |
17 | 17 |
18 class GrGLTexture : public GrTexture { | 18 class GrGLTexture : public GrTexture { |
19 | 19 |
20 public: | 20 public: |
21 struct TexParams { | 21 struct TexParams { |
22 GrGLenum fMinFilter; | 22 GrGLenum fMinFilter; |
23 GrGLenum fMagFilter; | 23 GrGLenum fMagFilter; |
24 GrGLenum fWrapS; | 24 GrGLenum fWrapS; |
25 GrGLenum fWrapT; | 25 GrGLenum fWrapT; |
26 GrGLenum fMaxMipMapLevel; | 26 GrGLenum fMaxMipMapLevel; |
27 GrGLenum fSwizzleRGBA[4]; | 27 GrGLenum fSwizzleRGBA[4]; |
| 28 GrGLenum fSRGBDecode; |
28 void invalidate() { memset(this, 0xff, sizeof(TexParams)); } | 29 void invalidate() { memset(this, 0xff, sizeof(TexParams)); } |
29 }; | 30 }; |
30 | 31 |
31 struct IDDesc { | 32 struct IDDesc { |
32 GrGLTextureInfo fInfo; | 33 GrGLTextureInfo fInfo; |
33 GrGpuResource::LifeCycle fLifeCycle; | 34 GrGpuResource::LifeCycle fLifeCycle; |
34 }; | 35 }; |
35 | 36 |
36 GrGLTexture(GrGLGpu*, const GrSurfaceDesc&, const IDDesc&); | 37 GrGLTexture(GrGLGpu*, const GrSurfaceDesc&, const IDDesc&); |
37 GrGLTexture(GrGLGpu*, const GrSurfaceDesc&, const IDDesc&, bool wasMipMapDat
aProvided); | 38 GrGLTexture(GrGLGpu*, const GrSurfaceDesc&, const IDDesc&, bool wasMipMapDat
aProvided); |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 GrGLTextureInfo fInfo; | 79 GrGLTextureInfo fInfo; |
79 | 80 |
80 // We track this separately from GrGpuResource because this may be both a te
xture and a render | 81 // We track this separately from GrGpuResource because this may be both a te
xture and a render |
81 // target, and the texture may be wrapped while the render target is not. | 82 // target, and the texture may be wrapped while the render target is not. |
82 LifeCycle fTextureIDLifecycle; | 83 LifeCycle fTextureIDLifecycle; |
83 | 84 |
84 typedef GrTexture INHERITED; | 85 typedef GrTexture INHERITED; |
85 }; | 86 }; |
86 | 87 |
87 #endif | 88 #endif |
OLD | NEW |