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

Side by Side Diff: src/gpu/gl/debug/GrDebugGL.cpp

Issue 544233002: "NULL !=" = NULL (Closed) Base URL: https://skia.googlesource.com/skia.git@are
Patch Set: rebase 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
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 if (fArrayBuffer) { 105 if (fArrayBuffer) {
106 GrAlwaysAssert(!fArrayBuffer->getDeleted()); 106 GrAlwaysAssert(!fArrayBuffer->getDeleted());
107 fArrayBuffer->ref(); 107 fArrayBuffer->ref();
108 108
109 GrAlwaysAssert(!fArrayBuffer->getBound()); 109 GrAlwaysAssert(!fArrayBuffer->getBound());
110 fArrayBuffer->setBound(); 110 fArrayBuffer->setBound();
111 } 111 }
112 } 112 }
113 113
114 void GrDebugGL::setVertexArray(GrVertexArrayObj* vertexArray) { 114 void GrDebugGL::setVertexArray(GrVertexArrayObj* vertexArray) {
115 if (NULL != vertexArray) { 115 if (vertexArray) {
116 SkASSERT(!vertexArray->getDeleted()); 116 SkASSERT(!vertexArray->getDeleted());
117 } 117 }
118 SkRefCnt_SafeAssign(fVertexArray, vertexArray); 118 SkRefCnt_SafeAssign(fVertexArray, vertexArray);
119 } 119 }
120 120
121 void GrDebugGL::setElementArrayBuffer(GrBufferObj *elementArrayBuffer) { 121 void GrDebugGL::setElementArrayBuffer(GrBufferObj *elementArrayBuffer) {
122 if (fElementArrayBuffer) { 122 if (fElementArrayBuffer) {
123 // automatically break the binding of the old buffer 123 // automatically break the binding of the old buffer
124 GrAlwaysAssert(fElementArrayBuffer->getBound()); 124 GrAlwaysAssert(fElementArrayBuffer->getBound());
125 fElementArrayBuffer->resetBound(); 125 fElementArrayBuffer->resetBound();
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 205
206 void GrDebugGL::report() const { 206 void GrDebugGL::report() const {
207 for (int i = 0; i < fObjects.count(); ++i) { 207 for (int i = 0; i < fObjects.count(); ++i) {
208 GrAlwaysAssert(0 < fObjects[i]->getHighRefCount()); 208 GrAlwaysAssert(0 < fObjects[i]->getHighRefCount());
209 if (!fAbandoned) { 209 if (!fAbandoned) {
210 GrAlwaysAssert(0 == fObjects[i]->getRefCount()); 210 GrAlwaysAssert(0 == fObjects[i]->getRefCount());
211 GrAlwaysAssert(fObjects[i]->getDeleted()); 211 GrAlwaysAssert(fObjects[i]->getDeleted());
212 } 212 }
213 } 213 }
214 } 214 }
OLDNEW
« no previous file with comments | « src/gpu/gl/builders/GrGLShaderBuilder.cpp ('k') | src/gpu/gl/debug/GrGLCreateDebugInterface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698