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