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

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

Issue 504313002: Make GrGpuResources register with GrResourceCache2 after fully constructed. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix insertion for GlyphPathRange. Created 6 years, 3 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/GrGLStencilBuffer.h ('k') | src/gpu/gl/GrGLVertexArray.cpp » ('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 15 matching lines...) Expand all
26 26
27 if (NULL != rtDesc) { 27 if (NULL != rtDesc) {
28 GrGLIRect vp; 28 GrGLIRect vp;
29 vp.fLeft = 0; 29 vp.fLeft = 0;
30 vp.fWidth = textureDesc.fWidth; 30 vp.fWidth = textureDesc.fWidth;
31 vp.fBottom = 0; 31 vp.fBottom = 0;
32 vp.fHeight = textureDesc.fHeight; 32 vp.fHeight = textureDesc.fHeight;
33 33
34 fRenderTarget.reset(SkNEW_ARGS(GrGLRenderTarget, (gpu, *rtDesc, vp, fTex IDObj, this))); 34 fRenderTarget.reset(SkNEW_ARGS(GrGLRenderTarget, (gpu, *rtDesc, vp, fTex IDObj, this)));
35 } 35 }
36 this->registerWithCache();
36 } 37 }
37 38
38 GrGLTexture::GrGLTexture(GrGpuGL* gpu, 39 GrGLTexture::GrGLTexture(GrGpuGL* gpu,
39 const Desc& textureDesc) 40 const Desc& textureDesc)
40 : INHERITED(gpu, textureDesc.fIsWrapped, textureDesc) { 41 : INHERITED(gpu, textureDesc.fIsWrapped, textureDesc) {
41 this->init(gpu, textureDesc, NULL); 42 this->init(gpu, textureDesc, NULL);
42 } 43 }
43 44
44 GrGLTexture::GrGLTexture(GrGpuGL* gpu, 45 GrGLTexture::GrGLTexture(GrGpuGL* gpu,
45 const Desc& textureDesc, 46 const Desc& textureDesc,
(...skipping 12 matching lines...) Expand all
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/GrGLStencilBuffer.h ('k') | src/gpu/gl/GrGLVertexArray.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698