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

Side by Side Diff: src/gpu/gl/debug/GrDebugGL.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/debug/GrDebugGL.h ('k') | src/gpu/gr_unittests.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 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "GrDebugGL.h" 9 #include "GrDebugGL.h"
10 #include "GrTextureObj.h" 10 #include "GrTextureObj.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 GrAlwaysAssert(!fArrayBuffer->getDeleted()); 105 GrAlwaysAssert(!fArrayBuffer->getDeleted());
106 fArrayBuffer->ref(); 106 fArrayBuffer->ref();
107 107
108 GrAlwaysAssert(!fArrayBuffer->getBound()); 108 GrAlwaysAssert(!fArrayBuffer->getBound());
109 fArrayBuffer->setBound(); 109 fArrayBuffer->setBound();
110 } 110 }
111 } 111 }
112 112
113 void GrDebugGL::setVertexArray(GrVertexArrayObj* vertexArray) { 113 void GrDebugGL::setVertexArray(GrVertexArrayObj* vertexArray) {
114 if (NULL != vertexArray) { 114 if (NULL != vertexArray) {
115 GrAssert(!vertexArray->getDeleted()); 115 SkASSERT(!vertexArray->getDeleted());
116 } 116 }
117 SkRefCnt_SafeAssign(fVertexArray, vertexArray); 117 SkRefCnt_SafeAssign(fVertexArray, vertexArray);
118 } 118 }
119 119
120 void GrDebugGL::setElementArrayBuffer(GrBufferObj *elementArrayBuffer) { 120 void GrDebugGL::setElementArrayBuffer(GrBufferObj *elementArrayBuffer) {
121 if (fElementArrayBuffer) { 121 if (fElementArrayBuffer) {
122 // automatically break the binding of the old buffer 122 // automatically break the binding of the old buffer
123 GrAlwaysAssert(fElementArrayBuffer->getBound()); 123 GrAlwaysAssert(fElementArrayBuffer->getBound());
124 fElementArrayBuffer->resetBound(); 124 fElementArrayBuffer->resetBound();
125 125
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 } 202 }
203 } 203 }
204 204
205 void GrDebugGL::report() const { 205 void GrDebugGL::report() const {
206 for (int i = 0; i < fObjects.count(); ++i) { 206 for (int i = 0; i < fObjects.count(); ++i) {
207 GrAlwaysAssert(0 == fObjects[i]->getRefCount()); 207 GrAlwaysAssert(0 == fObjects[i]->getRefCount());
208 GrAlwaysAssert(0 < fObjects[i]->getHighRefCount()); 208 GrAlwaysAssert(0 < fObjects[i]->getHighRefCount());
209 GrAlwaysAssert(fObjects[i]->getDeleted()); 209 GrAlwaysAssert(fObjects[i]->getDeleted());
210 } 210 }
211 } 211 }
OLDNEW
« no previous file with comments | « src/gpu/gl/debug/GrDebugGL.h ('k') | src/gpu/gr_unittests.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698