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

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

Issue 695133003: Remove GrGLTexID (Closed) Base URL: https://skia.googlesource.com/skia.git@diamond
Patch Set: rebase Created 6 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
« no previous file with comments | « no previous file | src/gpu/gl/GrGLTexture.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLTexture.h
diff --git a/src/gpu/gl/GrGLTexture.h b/src/gpu/gl/GrGLTexture.h
index 5c64eafe29e6fdc00501bc8b51e53fa771ec91e1..f23adae0d2765e89968d218cf0988e4ce069d9f9 100644
--- a/src/gpu/gl/GrGLTexture.h
+++ b/src/gpu/gl/GrGLTexture.h
@@ -13,38 +13,6 @@
#include "GrTexture.h"
#include "GrGLUtil.h"
-/**
- * A ref counted tex id that deletes the texture in its destructor.
- */
-class GrGLTexID : public SkRefCnt {
-public:
- SK_DECLARE_INST_COUNT(GrGLTexID)
-
- GrGLTexID(const GrGLInterface* gl, GrGLuint texID, bool isWrapped)
- : fGL(gl)
- , fTexID(texID)
- , fIsWrapped(isWrapped) {
- }
-
- virtual ~GrGLTexID() {
- if (0 != fTexID && !fIsWrapped) {
- GR_GL_CALL(fGL, DeleteTextures(1, &fTexID));
- }
- }
-
- void abandon() { fTexID = 0; }
- GrGLuint id() const { return fTexID; }
-
-private:
- const GrGLInterface* fGL;
- GrGLuint fTexID;
- bool fIsWrapped;
-
- typedef SkRefCnt INHERITED;
-};
-
-////////////////////////////////////////////////////////////////////////////////
-
class GrGLTexture : public GrTexture {
@@ -83,7 +51,7 @@ public:
fTexParamsTimestamp = timestamp;
}
- GrGLuint textureID() const { return (fTexIDObj.get()) ? fTexIDObj->id() : 0; }
+ GrGLuint textureID() const { return fTextureID; }
protected:
// The public constructor registers this object with the cache. However, only the most derived
@@ -100,7 +68,7 @@ protected:
private:
TexParams fTexParams;
GrGpu::ResetTimestamp fTexParamsTimestamp;
- SkAutoTUnref<GrGLTexID> fTexIDObj;
+ GrGLuint fTextureID;
typedef GrTexture INHERITED;
};
« no previous file with comments | « no previous file | src/gpu/gl/GrGLTexture.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698