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

Side by Side Diff: src/gpu/gl/GrGLTexture.cpp

Issue 405023003: Revert of Use the GrCacheable ID to eliminate the need for notifications to GrGpuGL when textures and RTs are… (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 5 months 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 unified diff | Download patch
« no previous file with comments | « src/gpu/gl/GrGLRenderTarget.cpp ('k') | src/gpu/gl/GrGpuGL.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "GrGLTexture.h" 8 #include "GrGLTexture.h"
9 #include "GrGpuGL.h" 9 #include "GrGpuGL.h"
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 } 42 }
43 43
44 GrGLTexture::GrGLTexture(GrGpuGL* gpu, 44 GrGLTexture::GrGLTexture(GrGpuGL* gpu,
45 const Desc& textureDesc, 45 const Desc& textureDesc,
46 const GrGLRenderTarget::Desc& rtDesc) 46 const GrGLRenderTarget::Desc& rtDesc)
47 : INHERITED(gpu, textureDesc.fIsWrapped, textureDesc) { 47 : INHERITED(gpu, textureDesc.fIsWrapped, textureDesc) {
48 this->init(gpu, textureDesc, &rtDesc); 48 this->init(gpu, textureDesc, &rtDesc);
49 } 49 }
50 50
51 void GrGLTexture::onRelease() { 51 void GrGLTexture::onRelease() {
52 GPUGL->notifyTextureDelete(this);
52 fTexIDObj.reset(NULL); 53 fTexIDObj.reset(NULL);
53 INHERITED::onRelease(); 54 INHERITED::onRelease();
54 } 55 }
55 56
56 void GrGLTexture::onAbandon() { 57 void GrGLTexture::onAbandon() {
57 if (NULL != fTexIDObj.get()) { 58 if (NULL != fTexIDObj.get()) {
58 fTexIDObj->abandon(); 59 fTexIDObj->abandon();
59 fTexIDObj.reset(NULL); 60 fTexIDObj.reset(NULL);
60 } 61 }
61 62
62 INHERITED::onAbandon(); 63 INHERITED::onAbandon();
63 } 64 }
64 65
65 GrBackendObject GrGLTexture::getTextureHandle() const { 66 GrBackendObject GrGLTexture::getTextureHandle() const {
66 return static_cast<GrBackendObject>(this->textureID()); 67 return static_cast<GrBackendObject>(this->textureID());
67 } 68 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLRenderTarget.cpp ('k') | src/gpu/gl/GrGpuGL.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698