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; |
}; |