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

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

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 | « src/gpu/gl/GrGLTexture.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLTexture.cpp
diff --git a/src/gpu/gl/GrGLTexture.cpp b/src/gpu/gl/GrGLTexture.cpp
index d9db6ea2a2c652d0bab1a7c3e88c1ad39cd4086b..8777d1b75559765f7117d9359d32911b71ca9c96 100644
--- a/src/gpu/gl/GrGLTexture.cpp
+++ b/src/gpu/gl/GrGLTexture.cpp
@@ -29,22 +29,21 @@ void GrGLTexture::init(const GrSurfaceDesc& desc, const IDDesc& idDesc) {
SkASSERT(0 != idDesc.fTextureID);
fTexParams.invalidate();
fTexParamsTimestamp = GrGpu::kExpiredTimestamp;
- fTexIDObj.reset(SkNEW_ARGS(GrGLTexID, (GPUGL->glInterface(),
- idDesc.fTextureID,
- idDesc.fIsWrapped)));
+ fTextureID = idDesc.fTextureID;
}
void GrGLTexture::onRelease() {
- fTexIDObj.reset(NULL);
+ if (fTextureID) {
+ if (!this->isWrapped()) {
+ GL_CALL(DeleteTextures(1, &fTextureID));
+ }
+ fTextureID = 0;
+ }
INHERITED::onRelease();
}
void GrGLTexture::onAbandon() {
- if (fTexIDObj.get()) {
- fTexIDObj->abandon();
- fTexIDObj.reset(NULL);
- }
-
+ fTextureID = 0;
INHERITED::onAbandon();
}
« no previous file with comments | « src/gpu/gl/GrGLTexture.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698