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

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

Issue 376703009: 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: now with 64 bits 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);
53 fTexIDObj.reset(NULL); 52 fTexIDObj.reset(NULL);
54 INHERITED::onRelease(); 53 INHERITED::onRelease();
55 } 54 }
56 55
57 void GrGLTexture::onAbandon() { 56 void GrGLTexture::onAbandon() {
58 if (NULL != fTexIDObj.get()) { 57 if (NULL != fTexIDObj.get()) {
59 fTexIDObj->abandon(); 58 fTexIDObj->abandon();
60 fTexIDObj.reset(NULL); 59 fTexIDObj.reset(NULL);
61 } 60 }
62 61
63 INHERITED::onAbandon(); 62 INHERITED::onAbandon();
64 } 63 }
65 64
66 GrBackendObject GrGLTexture::getTextureHandle() const { 65 GrBackendObject GrGLTexture::getTextureHandle() const {
67 return static_cast<GrBackendObject>(this->textureID()); 66 return static_cast<GrBackendObject>(this->textureID());
68 } 67 }
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