| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "GrInOrderDrawBuffer.h" | 8 #include "GrInOrderDrawBuffer.h" |
| 9 | 9 |
| 10 #include "GrBufferAllocPool.h" | 10 #include "GrBufferAllocPool.h" |
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 424 | 424 |
| 425 void GrInOrderDrawBuffer::reset() { | 425 void GrInOrderDrawBuffer::reset() { |
| 426 SkASSERT(1 == fGeoPoolStateStack.count()); | 426 SkASSERT(1 == fGeoPoolStateStack.count()); |
| 427 this->resetVertexSource(); | 427 this->resetVertexSource(); |
| 428 this->resetIndexSource(); | 428 this->resetIndexSource(); |
| 429 int numDraws = fDraws.count(); | 429 int numDraws = fDraws.count(); |
| 430 for (int d = 0; d < numDraws; ++d) { | 430 for (int d = 0; d < numDraws; ++d) { |
| 431 // we always have a VB, but not always an IB | 431 // we always have a VB, but not always an IB |
| 432 SkASSERT(NULL != fDraws[d].fVertexBuffer); | 432 SkASSERT(NULL != fDraws[d].fVertexBuffer); |
| 433 fDraws[d].fVertexBuffer->unref(); | 433 fDraws[d].fVertexBuffer->unref(); |
| 434 GrSafeUnref(fDraws[d].fIndexBuffer); | 434 SkSafeUnref(fDraws[d].fIndexBuffer); |
| 435 } | 435 } |
| 436 fCmds.reset(); | 436 fCmds.reset(); |
| 437 fDraws.reset(); | 437 fDraws.reset(); |
| 438 fStencilPaths.reset(); | 438 fStencilPaths.reset(); |
| 439 fStates.reset(); | 439 fStates.reset(); |
| 440 fClears.reset(); | 440 fClears.reset(); |
| 441 fVertexPool.reset(); | 441 fVertexPool.reset(); |
| 442 fIndexPool.reset(); | 442 fIndexPool.reset(); |
| 443 fClips.reset(); | 443 fClips.reset(); |
| 444 fClipOrigins.reset(); | 444 fClipOrigins.reset(); |
| (...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 820 fCmds.push_back(kCopySurface_Cmd); | 820 fCmds.push_back(kCopySurface_Cmd); |
| 821 return &fCopySurfaces.push_back(); | 821 return &fCopySurfaces.push_back(); |
| 822 } | 822 } |
| 823 | 823 |
| 824 | 824 |
| 825 void GrInOrderDrawBuffer::clipWillBeSet(const GrClipData* newClipData) { | 825 void GrInOrderDrawBuffer::clipWillBeSet(const GrClipData* newClipData) { |
| 826 INHERITED::clipWillBeSet(newClipData); | 826 INHERITED::clipWillBeSet(newClipData); |
| 827 fClipSet = true; | 827 fClipSet = true; |
| 828 fClipProxyState = kUnknown_ClipProxyState; | 828 fClipProxyState = kUnknown_ClipProxyState; |
| 829 } | 829 } |
| OLD | NEW |