| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |