Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(231)

Unified Diff: src/gpu/gl/GrGLTexture.h

Issue 1429863009: Use a struct for client GL texture handles (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/gpu/gl/GrGLTexture.h
diff --git a/src/gpu/gl/GrGLTexture.h b/src/gpu/gl/GrGLTexture.h
index 40a68eb9e901e292d329745d504d612faf9cc468..8366a8dab06c9b4e58eef0d73f9c3e3ba9f71b54 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.

Powered by Google App Engine
This is Rietveld 408576698