diff options
author | 2015-11-10 11:54:56 -0800 | |
---|---|---|
committer | 2015-11-10 11:54:57 -0800 | |
commit | 091f60c2a0e4504c017b8a67ff96a0e829519b14 (patch) | |
tree | b77c149adc2d855b7aaf62c53398f9213ccedf20 /src/gpu/gl/GrGLTexture.h | |
parent | 6dfe9ac3aad3ab8ec3a0f1684c94fef0c6ad9c3e (diff) |
Use a struct for client GL texture handles
Review URL: https://codereview.chromium.org/1429863009
Diffstat (limited to 'src/gpu/gl/GrGLTexture.h')
-rw-r--r-- | src/gpu/gl/GrGLTexture.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gpu/gl/GrGLTexture.h b/src/gpu/gl/GrGLTexture.h index 40a68eb9e9..8366a8dab0 100644 --- a/src/gpu/gl/GrGLTexture.h +++ b/src/gpu/gl/GrGLTexture.h @@ -28,8 +28,7 @@ public: }; struct IDDesc { - GrGLenum fTarget; - GrGLuint fTextureID; + GrGLTextureInfo fInfo; GrGpuResource::LifeCycle fLifeCycle; }; @@ -51,9 +50,9 @@ public: fTexParamsTimestamp = timestamp; } - GrGLuint textureID() const { return fTextureID; } + GrGLuint textureID() const { return fInfo.fID; } - GrGLenum target() const { return fTarget; } + GrGLenum target() const { return fInfo.fTarget; } protected: // The public constructor registers this object with the cache. However, only the most derived @@ -72,8 +71,9 @@ protected: private: TexParams fTexParams; GrGpu::ResetTimestamp fTexParamsTimestamp; - GrGLenum fTarget; - GrGLuint fTextureID; + // Holds the texture target and ID. A pointer to this may be shared to external clients for + // direct interaction with the GL object. + GrGLTextureInfo fInfo; // We track this separately from GrGpuResource because this may be both a texture and a render // target, and the texture may be wrapped while the render target is not. |