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

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

Issue 13814015: Reland of 8525 with fix for case when GrRT outlives GrTexture. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
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 16 matching lines...) Expand all
27 textureDesc.fTextureID, 27 textureDesc.fTextureID,
28 textureDesc.fIsWrapped)); 28 textureDesc.fIsWrapped));
29 29
30 if (NULL != rtDesc) { 30 if (NULL != rtDesc) {
31 GrGLIRect vp; 31 GrGLIRect vp;
32 vp.fLeft = 0; 32 vp.fLeft = 0;
33 vp.fWidth = textureDesc.fWidth; 33 vp.fWidth = textureDesc.fWidth;
34 vp.fBottom = 0; 34 vp.fBottom = 0;
35 vp.fHeight = textureDesc.fHeight; 35 vp.fHeight = textureDesc.fHeight;
36 36
37 fRenderTarget = SkNEW_ARGS(GrGLRenderTarget, 37 fRenderTarget.reset(SkNEW_ARGS(GrGLRenderTarget, (gpu, *rtDesc, vp, fTex IDObj, this)));
38 (gpu, *rtDesc, vp, fTexIDObj, this));
39 } 38 }
40 } 39 }
41 40
42 GrGLTexture::GrGLTexture(GrGpuGL* gpu, 41 GrGLTexture::GrGLTexture(GrGpuGL* gpu,
43 const Desc& textureDesc) 42 const Desc& textureDesc)
44 : INHERITED(gpu, textureDesc.fIsWrapped, textureDesc) { 43 : INHERITED(gpu, textureDesc.fIsWrapped, textureDesc) {
45 this->init(gpu, textureDesc, NULL); 44 this->init(gpu, textureDesc, NULL);
46 } 45 }
47 46
48 GrGLTexture::GrGLTexture(GrGpuGL* gpu, 47 GrGLTexture::GrGLTexture(GrGpuGL* gpu,
(...skipping 17 matching lines...) Expand all
66 if (NULL != fTexIDObj) { 65 if (NULL != fTexIDObj) {
67 fTexIDObj->abandon(); 66 fTexIDObj->abandon();
68 } 67 }
69 68
70 INHERITED::onAbandon(); 69 INHERITED::onAbandon();
71 } 70 }
72 71
73 GrBackendObject GrGLTexture::getTextureHandle() const { 72 GrBackendObject GrGLTexture::getTextureHandle() const {
74 return fTexIDObj->id(); 73 return fTexIDObj->id();
75 } 74 }
OLDNEW
« src/gpu/GrTexture.cpp ('K') | « src/gpu/GrTexture.cpp ('k') | tests/GrSurfaceTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698