| 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 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 GrGLenum fSwizzleRGBA[4]; | 26 GrGLenum fSwizzleRGBA[4]; |
| 27 void invalidate() { memset(this, 0xff, sizeof(TexParams)); } | 27 void invalidate() { memset(this, 0xff, sizeof(TexParams)); } |
| 28 }; | 28 }; |
| 29 | 29 |
| 30 struct IDDesc { | 30 struct IDDesc { |
| 31 GrGLTextureInfo fInfo; | 31 GrGLTextureInfo fInfo; |
| 32 GrGpuResource::LifeCycle fLifeCycle; | 32 GrGpuResource::LifeCycle fLifeCycle; |
| 33 }; | 33 }; |
| 34 | 34 |
| 35 GrGLTexture(GrGLGpu*, const GrSurfaceDesc&, const IDDesc&); | 35 GrGLTexture(GrGLGpu*, const GrSurfaceDesc&, const IDDesc&); |
| 36 GrGLTexture(GrGLGpu*, const GrSurfaceDesc&, const IDDesc&, bool wasMipMapDat
aProvided); |
| 36 | 37 |
| 37 GrBackendObject getTextureHandle() const override; | 38 GrBackendObject getTextureHandle() const override; |
| 38 | 39 |
| 39 void textureParamsModified() override { fTexParams.invalidate(); } | 40 void textureParamsModified() override { fTexParams.invalidate(); } |
| 40 | 41 |
| 41 // These functions are used to track the texture parameters associated with
the texture. | 42 // These functions are used to track the texture parameters associated with
the texture. |
| 42 const TexParams& getCachedTexParams(GrGpu::ResetTimestamp* timestamp) const
{ | 43 const TexParams& getCachedTexParams(GrGpu::ResetTimestamp* timestamp) const
{ |
| 43 *timestamp = fTexParamsTimestamp; | 44 *timestamp = fTexParamsTimestamp; |
| 44 return fTexParams; | 45 return fTexParams; |
| 45 } | 46 } |
| (...skipping 30 matching lines...) Expand all Loading... |
| 76 GrGLTextureInfo fInfo; | 77 GrGLTextureInfo fInfo; |
| 77 | 78 |
| 78 // We track this separately from GrGpuResource because this may be both a te
xture and a render | 79 // We track this separately from GrGpuResource because this may be both a te
xture and a render |
| 79 // target, and the texture may be wrapped while the render target is not. | 80 // target, and the texture may be wrapped while the render target is not. |
| 80 LifeCycle fTextureIDLifecycle; | 81 LifeCycle fTextureIDLifecycle; |
| 81 | 82 |
| 82 typedef GrTexture INHERITED; | 83 typedef GrTexture INHERITED; |
| 83 }; | 84 }; |
| 84 | 85 |
| 85 #endif | 86 #endif |
| OLD | NEW |