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

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

Issue 22850006: Replace uses of GrAssert by SkASSERT. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rebase Created 7 years, 4 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
« no previous file with comments | « src/gpu/gl/GrGLProgramDesc.cpp ('k') | src/gpu/gl/GrGLSL.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 "GrGLRenderTarget.h" 8 #include "GrGLRenderTarget.h"
9 9
10 #include "GrGpuGL.h" 10 #include "GrGpuGL.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 const GrGLIRect& viewport, 45 const GrGLIRect& viewport,
46 GrGLTexID* texID, 46 GrGLTexID* texID,
47 GrGLTexture* texture) 47 GrGLTexture* texture)
48 : INHERITED(gpu, 48 : INHERITED(gpu,
49 desc.fIsWrapped, 49 desc.fIsWrapped,
50 texture, 50 texture,
51 MakeDesc(kNone_GrTextureFlags, 51 MakeDesc(kNone_GrTextureFlags,
52 viewport.fWidth, viewport.fHeight, 52 viewport.fWidth, viewport.fHeight,
53 desc.fConfig, desc.fSampleCnt, 53 desc.fConfig, desc.fSampleCnt,
54 desc.fOrigin)) { 54 desc.fOrigin)) {
55 GrAssert(NULL != texID); 55 SkASSERT(NULL != texID);
56 GrAssert(NULL != texture); 56 SkASSERT(NULL != texture);
57 // FBO 0 can't also be a texture, right? 57 // FBO 0 can't also be a texture, right?
58 GrAssert(0 != desc.fRTFBOID); 58 SkASSERT(0 != desc.fRTFBOID);
59 GrAssert(0 != desc.fTexFBOID); 59 SkASSERT(0 != desc.fTexFBOID);
60 60
61 // we assume this is true, TODO: get rid of viewport as a param. 61 // we assume this is true, TODO: get rid of viewport as a param.
62 GrAssert(viewport.fWidth == texture->width()); 62 SkASSERT(viewport.fWidth == texture->width());
63 GrAssert(viewport.fHeight == texture->height()); 63 SkASSERT(viewport.fHeight == texture->height());
64 64
65 this->init(desc, viewport, texID); 65 this->init(desc, viewport, texID);
66 } 66 }
67 67
68 GrGLRenderTarget::GrGLRenderTarget(GrGpuGL* gpu, 68 GrGLRenderTarget::GrGLRenderTarget(GrGpuGL* gpu,
69 const Desc& desc, 69 const Desc& desc,
70 const GrGLIRect& viewport) 70 const GrGLIRect& viewport)
71 : INHERITED(gpu, 71 : INHERITED(gpu,
72 desc.fIsWrapped, 72 desc.fIsWrapped,
73 NULL, 73 NULL,
(...skipping 27 matching lines...) Expand all
101 void GrGLRenderTarget::onAbandon() { 101 void GrGLRenderTarget::onAbandon() {
102 fRTFBOID = 0; 102 fRTFBOID = 0;
103 fTexFBOID = 0; 103 fTexFBOID = 0;
104 fMSColorRenderbufferID = 0; 104 fMSColorRenderbufferID = 0;
105 if (NULL != fTexIDObj.get()) { 105 if (NULL != fTexIDObj.get()) {
106 fTexIDObj->abandon(); 106 fTexIDObj->abandon();
107 fTexIDObj.reset(NULL); 107 fTexIDObj.reset(NULL);
108 } 108 }
109 INHERITED::onAbandon(); 109 INHERITED::onAbandon();
110 } 110 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLProgramDesc.cpp ('k') | src/gpu/gl/GrGLSL.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698