Make GrResource know whether 3D objects' lifetimes are managed by Skia or not.
Review URL: https://codereview.appspot.com/7201046
git-svn-id: http://skia.googlecode.com/svn/trunk@7348 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/gl/GrGLTexture.h b/src/gpu/gl/GrGLTexture.h
index 4666bfb..527bab0 100644
--- a/src/gpu/gl/GrGLTexture.h
+++ b/src/gpu/gl/GrGLTexture.h
@@ -19,14 +19,14 @@
public:
SK_DECLARE_INST_COUNT(GrGLTexID)
- GrGLTexID(const GrGLInterface* gl, GrGLuint texID, bool ownsID)
+ GrGLTexID(const GrGLInterface* gl, GrGLuint texID, bool isWrapped)
: fGL(gl)
, fTexID(texID)
- , fOwnsID(ownsID) {
+ , fIsWrapped(isWrapped) {
}
virtual ~GrGLTexID() {
- if (0 != fTexID && fOwnsID) {
+ if (0 != fTexID && !fIsWrapped) {
GR_GL_CALL(fGL, DeleteTextures(1, &fTexID));
}
}
@@ -37,7 +37,7 @@
private:
const GrGLInterface* fGL;
GrGLuint fTexID;
- bool fOwnsID;
+ bool fIsWrapped;
typedef GrRefCnt INHERITED;
};
@@ -58,7 +58,7 @@
struct Desc : public GrTextureDesc {
GrGLuint fTextureID;
- bool fOwnsID;
+ bool fIsWrapped;
Origin fOrigin;
};