| 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 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 434 rect = &r; | 434 rect = &r; |
| 435 } | 435 } |
| 436 Clear* clr = this->recordClear(); | 436 Clear* clr = this->recordClear(); |
| 437 clr->fColor = color; | 437 clr->fColor = color; |
| 438 clr->fRect = *rect; | 438 clr->fRect = *rect; |
| 439 clr->fCanIgnoreRect = canIgnoreRect; | 439 clr->fCanIgnoreRect = canIgnoreRect; |
| 440 clr->fRenderTarget = renderTarget; | 440 clr->fRenderTarget = renderTarget; |
| 441 renderTarget->ref(); | 441 renderTarget->ref(); |
| 442 } | 442 } |
| 443 | 443 |
| 444 void GrInOrderDrawBuffer::onInstantGpuTraceEvent(const char* marker) { |
| 445 // TODO: adds command to buffer |
| 446 } |
| 447 |
| 448 void GrInOrderDrawBuffer::onPushGpuTraceEvent(const char* marker) { |
| 449 // TODO: adds command to buffer |
| 450 } |
| 451 |
| 452 void GrInOrderDrawBuffer::onPopGpuTraceEvent() { |
| 453 // TODO: adds command to buffer |
| 454 } |
| 455 |
| 444 void GrInOrderDrawBuffer::reset() { | 456 void GrInOrderDrawBuffer::reset() { |
| 445 SkASSERT(1 == fGeoPoolStateStack.count()); | 457 SkASSERT(1 == fGeoPoolStateStack.count()); |
| 446 this->resetVertexSource(); | 458 this->resetVertexSource(); |
| 447 this->resetIndexSource(); | 459 this->resetIndexSource(); |
| 448 int numDraws = fDraws.count(); | 460 int numDraws = fDraws.count(); |
| 449 for (int d = 0; d < numDraws; ++d) { | 461 for (int d = 0; d < numDraws; ++d) { |
| 450 // we always have a VB, but not always an IB | 462 // we always have a VB, but not always an IB |
| 451 SkASSERT(NULL != fDraws[d].fVertexBuffer); | 463 SkASSERT(NULL != fDraws[d].fVertexBuffer); |
| 452 fDraws[d].fVertexBuffer->unref(); | 464 fDraws[d].fVertexBuffer->unref(); |
| 453 SkSafeUnref(fDraws[d].fIndexBuffer); | 465 SkSafeUnref(fDraws[d].fIndexBuffer); |
| (...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 853 fCmds.push_back(kCopySurface_Cmd); | 865 fCmds.push_back(kCopySurface_Cmd); |
| 854 return &fCopySurfaces.push_back(); | 866 return &fCopySurfaces.push_back(); |
| 855 } | 867 } |
| 856 | 868 |
| 857 | 869 |
| 858 void GrInOrderDrawBuffer::clipWillBeSet(const GrClipData* newClipData) { | 870 void GrInOrderDrawBuffer::clipWillBeSet(const GrClipData* newClipData) { |
| 859 INHERITED::clipWillBeSet(newClipData); | 871 INHERITED::clipWillBeSet(newClipData); |
| 860 fClipSet = true; | 872 fClipSet = true; |
| 861 fClipProxyState = kUnknown_ClipProxyState; | 873 fClipProxyState = kUnknown_ClipProxyState; |
| 862 } | 874 } |
| OLD | NEW |