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