| 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; | |
| 29 void invalidate() { memset(this, 0xff, sizeof(TexParams)); } | 28 void invalidate() { memset(this, 0xff, sizeof(TexParams)); } |
| 30 }; | 29 }; |
| 31 | 30 |
| 32 struct IDDesc { | 31 struct IDDesc { |
| 33 GrGLTextureInfo fInfo; | 32 GrGLTextureInfo fInfo; |
| 34 GrGpuResource::LifeCycle fLifeCycle; | 33 GrGpuResource::LifeCycle fLifeCycle; |
| 35 }; | 34 }; |
| 36 | 35 |
| 37 GrGLTexture(GrGLGpu*, const GrSurfaceDesc&, const IDDesc&); | 36 GrGLTexture(GrGLGpu*, const GrSurfaceDesc&, const IDDesc&); |
| 38 GrGLTexture(GrGLGpu*, const GrSurfaceDesc&, const IDDesc&, bool wasMipMapDat
aProvided); | 37 GrGLTexture(GrGLGpu*, const GrSurfaceDesc&, const IDDesc&, bool wasMipMapDat
aProvided); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 GrGLTextureInfo fInfo; | 78 GrGLTextureInfo fInfo; |
| 80 | 79 |
| 81 // We track this separately from GrGpuResource because this may be both a te
xture and a render | 80 // We track this separately from GrGpuResource because this may be both a te
xture and a render |
| 82 // target, and the texture may be wrapped while the render target is not. | 81 // target, and the texture may be wrapped while the render target is not. |
| 83 LifeCycle fTextureIDLifecycle; | 82 LifeCycle fTextureIDLifecycle; |
| 84 | 83 |
| 85 typedef GrTexture INHERITED; | 84 typedef GrTexture INHERITED; |
| 86 }; | 85 }; |
| 87 | 86 |
| 88 #endif | 87 #endif |
| OLD | NEW |