1dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com 2dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com/* 3dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com * Copyright 2012 Google Inc. 4dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com * 5dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com * Use of this source code is governed by a BSD-style license that can be 6dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com * found in the LICENSE file. 7dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com */ 8dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com 9dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com#include "GrDebugGL.h" 10dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com#include "GrTextureObj.h" 11dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com#include "GrBufferObj.h" 12dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com#include "GrRenderBufferObj.h" 13dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com#include "GrFrameBufferObj.h" 14dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com#include "GrShaderObj.h" 15dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com#include "GrProgramObj.h" 16dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com#include "GrTextureUnitObj.h" 17ecd84842b3f65918eb040c53391172b6413fd7adbsalomon@google.com#include "GrVertexArrayObj.h" 18dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com 192880df2609eba09b555ca37be04b6ad89290c765Tom HudsonGrDebugGL* GrDebugGL::gObj = nullptr; 20622a17091b69df8d54d318c88f34851677a6d9c2robertphillips@google.comint GrDebugGL::gStaticRefCount = 0; 21dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.comGrDebugGL::Create GrDebugGL::gFactoryFunc[kObjTypeCount] = { 22dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com GrTextureObj::createGrTextureObj, 23dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com GrBufferObj::createGrBufferObj, 24dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com GrRenderBufferObj::createGrRenderBufferObj, 25dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com GrFrameBufferObj::createGrFrameBufferObj, 26dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com GrShaderObj::createGrShaderObj, 27dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com GrProgramObj::createGrProgramObj, 28dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com GrTextureUnitObj::createGrTextureUnitObj, 29ecd84842b3f65918eb040c53391172b6413fd7adbsalomon@google.com GrVertexArrayObj::createGrVertexArrayObj, 30dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com}; 31dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com 32dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com 33fbfcd5602128ec010c82cb733c9cdc0a3254f9f3rmistry@google.comGrDebugGL::GrDebugGL() 34670ff9ae7f37356bff08b30a356bb0c52dc8d62erobertphillips@google.com : fPackRowLength(0) 35670ff9ae7f37356bff08b30a356bb0c52dc8d62erobertphillips@google.com , fUnPackRowLength(0) 36670ff9ae7f37356bff08b30a356bb0c52dc8d62erobertphillips@google.com , fCurTextureUnit(0) 372880df2609eba09b555ca37be04b6ad89290c765Tom Hudson , fArrayBuffer(nullptr) 382880df2609eba09b555ca37be04b6ad89290c765Tom Hudson , fElementArrayBuffer(nullptr) 392880df2609eba09b555ca37be04b6ad89290c765Tom Hudson , fFrameBuffer(nullptr) 402880df2609eba09b555ca37be04b6ad89290c765Tom Hudson , fRenderBuffer(nullptr) 412880df2609eba09b555ca37be04b6ad89290c765Tom Hudson , fProgram(nullptr) 422880df2609eba09b555ca37be04b6ad89290c765Tom Hudson , fTexture(nullptr) 432880df2609eba09b555ca37be04b6ad89290c765Tom Hudson , fVertexArray(nullptr) 44944bcf0acb78f8f9da01e991f1307629959e338absalomon , fAbandoned(false) { 45dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com 46dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com for (int i = 0; i < kDefaultMaxTextureUnits; ++i) { 47622a17091b69df8d54d318c88f34851677a6d9c2robertphillips@google.com 48622a17091b69df8d54d318c88f34851677a6d9c2robertphillips@google.com fTextureUnits[i] = reinterpret_cast<GrTextureUnitObj *>( 49622a17091b69df8d54d318c88f34851677a6d9c2robertphillips@google.com createObj(GrDebugGL::kTextureUnit_ObjTypes)); 50dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com fTextureUnits[i]->ref(); 51dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com 52dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com fTextureUnits[i]->setNumber(i); 53dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com } 54dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com} 55dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com 56dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.comGrDebugGL::~GrDebugGL() { 57dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com // unref & delete the texture units first so they don't show up on the leak report 58dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com for (int i = 0; i < kDefaultMaxTextureUnits; ++i) { 59dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com fTextureUnits[i]->unref(); 60dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com fTextureUnits[i]->deleteAction(); 61dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com } 62dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com 63dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com this->report(); 64dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com 65dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com for (int i = 0; i < fObjects.count(); ++i) { 66dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com delete fObjects[i]; 67dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com } 68dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com fObjects.reset(); 69dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com 702880df2609eba09b555ca37be04b6ad89290c765Tom Hudson fArrayBuffer = nullptr; 712880df2609eba09b555ca37be04b6ad89290c765Tom Hudson fElementArrayBuffer = nullptr; 722880df2609eba09b555ca37be04b6ad89290c765Tom Hudson fFrameBuffer = nullptr; 732880df2609eba09b555ca37be04b6ad89290c765Tom Hudson fRenderBuffer = nullptr; 742880df2609eba09b555ca37be04b6ad89290c765Tom Hudson fProgram = nullptr; 752880df2609eba09b555ca37be04b6ad89290c765Tom Hudson fTexture = nullptr; 762880df2609eba09b555ca37be04b6ad89290c765Tom Hudson fVertexArray = nullptr; 77dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com} 78dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com 79dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.comGrFakeRefObj *GrDebugGL::findObject(GrGLuint ID, GrObjTypes type) { 80dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com for (int i = 0; i < fObjects.count(); ++i) { 81dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com if (fObjects[i]->getID() == ID) { // && fObjects[i]->getType() == type) { 82dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com // The application shouldn't be accessing objects 83fbfcd5602128ec010c82cb733c9cdc0a3254f9f3rmistry@google.com // that (as far as OpenGL knows) were already deleted 84dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com GrAlwaysAssert(!fObjects[i]->getDeleted()); 85dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com GrAlwaysAssert(!fObjects[i]->getMarkedForDeletion()); 86dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com return fObjects[i]; 87dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com } 88dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com } 89dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com 902880df2609eba09b555ca37be04b6ad89290c765Tom Hudson return nullptr; 91dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com} 92dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com 93fbfcd5602128ec010c82cb733c9cdc0a3254f9f3rmistry@google.comvoid GrDebugGL::setArrayBuffer(GrBufferObj *arrayBuffer) { 94dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com if (fArrayBuffer) { 95dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com // automatically break the binding of the old buffer 96dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com GrAlwaysAssert(fArrayBuffer->getBound()); 97dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com fArrayBuffer->resetBound(); 98dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com 99dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com GrAlwaysAssert(!fArrayBuffer->getDeleted()); 100dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com fArrayBuffer->unref(); 101dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com } 102dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com 103fbfcd5602128ec010c82cb733c9cdc0a3254f9f3rmistry@google.com fArrayBuffer = arrayBuffer; 104dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com 105dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com if (fArrayBuffer) { 106dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com GrAlwaysAssert(!fArrayBuffer->getDeleted()); 107dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com fArrayBuffer->ref(); 108dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com 109dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com GrAlwaysAssert(!fArrayBuffer->getBound()); 110dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com fArrayBuffer->setBound(); 111dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com } 112dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com} 113dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com 114ecd84842b3f65918eb040c53391172b6413fd7adbsalomon@google.comvoid GrDebugGL::setVertexArray(GrVertexArrayObj* vertexArray) { 11549f085dddff10473b6ebf832a974288300224e60bsalomon if (vertexArray) { 116f6de475e5cbd143f348ff7738919e397b7fe7f57tfarina@chromium.org SkASSERT(!vertexArray->getDeleted()); 117ecd84842b3f65918eb040c53391172b6413fd7adbsalomon@google.com } 118ecd84842b3f65918eb040c53391172b6413fd7adbsalomon@google.com SkRefCnt_SafeAssign(fVertexArray, vertexArray); 119ecd84842b3f65918eb040c53391172b6413fd7adbsalomon@google.com} 120ecd84842b3f65918eb040c53391172b6413fd7adbsalomon@google.com 121fbfcd5602128ec010c82cb733c9cdc0a3254f9f3rmistry@google.comvoid GrDebugGL::setElementArrayBuffer(GrBufferObj *elementArrayBuffer) { 122dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com if (fElementArrayBuffer) { 123dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com // automatically break the binding of the old buffer 124dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com GrAlwaysAssert(fElementArrayBuffer->getBound()); 125dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com fElementArrayBuffer->resetBound(); 126dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com 127dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com GrAlwaysAssert(!fElementArrayBuffer->getDeleted()); 128dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com fElementArrayBuffer->unref(); 129dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com } 130dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com 131fbfcd5602128ec010c82cb733c9cdc0a3254f9f3rmistry@google.com fElementArrayBuffer = elementArrayBuffer; 132dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com 133dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com if (fElementArrayBuffer) { 134dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com GrAlwaysAssert(!fElementArrayBuffer->getDeleted()); 135dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com fElementArrayBuffer->ref(); 136dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com 137dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com GrAlwaysAssert(!fElementArrayBuffer->getBound()); 138dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com fElementArrayBuffer->setBound(); 139dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com } 140dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com} 141dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com 142fbfcd5602128ec010c82cb733c9cdc0a3254f9f3rmistry@google.comvoid GrDebugGL::setTexture(GrTextureObj *texture) { 143dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com fTextureUnits[fCurTextureUnit]->setTexture(texture); 144dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com} 145dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com 146fbfcd5602128ec010c82cb733c9cdc0a3254f9f3rmistry@google.comvoid GrDebugGL::setFrameBuffer(GrFrameBufferObj *frameBuffer) { 147dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com if (fFrameBuffer) { 148dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com GrAlwaysAssert(fFrameBuffer->getBound()); 149dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com fFrameBuffer->resetBound(); 150dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com 151dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com GrAlwaysAssert(!fFrameBuffer->getDeleted()); 152dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com fFrameBuffer->unref(); 153dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com } 154dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com 155fbfcd5602128ec010c82cb733c9cdc0a3254f9f3rmistry@google.com fFrameBuffer = frameBuffer; 156dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com 157dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com if (fFrameBuffer) { 158dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com GrAlwaysAssert(!fFrameBuffer->getDeleted()); 159dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com fFrameBuffer->ref(); 160dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com 161dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com GrAlwaysAssert(!fFrameBuffer->getBound()); 162dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com fFrameBuffer->setBound(); 163dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com } 164dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com} 165dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com 166fbfcd5602128ec010c82cb733c9cdc0a3254f9f3rmistry@google.comvoid GrDebugGL::setRenderBuffer(GrRenderBufferObj *renderBuffer) { 167dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com if (fRenderBuffer) { 168dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com GrAlwaysAssert(fRenderBuffer->getBound()); 169dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com fRenderBuffer->resetBound(); 170dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com 171dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com GrAlwaysAssert(!fRenderBuffer->getDeleted()); 172dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com fRenderBuffer->unref(); 173dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com } 174dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com 175fbfcd5602128ec010c82cb733c9cdc0a3254f9f3rmistry@google.com fRenderBuffer = renderBuffer; 176dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com 177dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com if (fRenderBuffer) { 178dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com GrAlwaysAssert(!fRenderBuffer->getDeleted()); 179dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com fRenderBuffer->ref(); 180dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com 181dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com GrAlwaysAssert(!fRenderBuffer->getBound()); 182dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com fRenderBuffer->setBound(); 183dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com } 184dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com} 185dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com 186dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.comvoid GrDebugGL::useProgram(GrProgramObj *program) { 187dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com if (fProgram) { 188dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com GrAlwaysAssert(fProgram->getInUse()); 189dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com fProgram->resetInUse(); 190dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com 191dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com GrAlwaysAssert(!fProgram->getDeleted()); 192dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com fProgram->unref(); 193dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com } 194dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com 195dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com fProgram = program; 196dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com 197dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com if (fProgram) { 198dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com GrAlwaysAssert(!fProgram->getDeleted()); 199dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com fProgram->ref(); 200dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com 201dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com GrAlwaysAssert(!fProgram->getInUse()); 202dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com fProgram->setInUse(); 203dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com } 204dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com} 205dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com 206dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.comvoid GrDebugGL::report() const { 207dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com for (int i = 0; i < fObjects.count(); ++i) { 208944bcf0acb78f8f9da01e991f1307629959e338absalomon if (!fAbandoned) { 209944bcf0acb78f8f9da01e991f1307629959e338absalomon GrAlwaysAssert(0 == fObjects[i]->getRefCount()); 210944bcf0acb78f8f9da01e991f1307629959e338absalomon GrAlwaysAssert(fObjects[i]->getDeleted()); 211944bcf0acb78f8f9da01e991f1307629959e338absalomon } 212dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com } 213dd743fefad9764ad86d7f69deec32e9a3b5de47frobertphillips@google.com} 214