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 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 memcpy(dp->transforms(), transforms, sizeOfTransforms); | 407 memcpy(dp->transforms(), transforms, sizeOfTransforms); |
408 dp->fTransformsType = transformsType; | 408 dp->fTransformsType = transformsType; |
409 dp->fFill = fill; | 409 dp->fFill = fill; |
410 if (dstCopy) { | 410 if (dstCopy) { |
411 dp->fDstCopy = *dstCopy; | 411 dp->fDstCopy = *dstCopy; |
412 } | 412 } |
413 | 413 |
414 this->recordTraceMarkersIfNecessary(); | 414 this->recordTraceMarkersIfNecessary(); |
415 } | 415 } |
416 | 416 |
417 void GrInOrderDrawBuffer::clear(const SkIRect* rect, GrColor color, | 417 void GrInOrderDrawBuffer::onClear(const SkIRect* rect, GrColor color, |
418 bool canIgnoreRect, GrRenderTarget* renderTarget
) { | 418 bool canIgnoreRect, GrRenderTarget* renderTarg
et) { |
419 SkIRect r; | 419 SkIRect r; |
420 if (NULL == renderTarget) { | 420 if (NULL == renderTarget) { |
421 renderTarget = this->drawState()->getRenderTarget(); | 421 renderTarget = this->drawState()->getRenderTarget(); |
422 SkASSERT(renderTarget); | 422 SkASSERT(renderTarget); |
423 } | 423 } |
424 if (NULL == rect) { | 424 if (NULL == rect) { |
425 // We could do something smart and remove previous draws and clears to | 425 // We could do something smart and remove previous draws and clears to |
426 // the current render target. If we get that smart we have to make sure | 426 // the current render target. If we get that smart we have to make sure |
427 // those draws aren't read before this clear (render-to-texture). | 427 // those draws aren't read before this clear (render-to-texture). |
428 r.setLTRB(0, 0, renderTarget->width(), renderTarget->height()); | 428 r.setLTRB(0, 0, renderTarget->width(), renderTarget->height()); |
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
816 fCmdBuffer.back().fType = add_trace_bit(fCmdBuffer.back().fType); | 816 fCmdBuffer.back().fType = add_trace_bit(fCmdBuffer.back().fType); |
817 fGpuCmdMarkers.push_back(activeTraceMarkers); | 817 fGpuCmdMarkers.push_back(activeTraceMarkers); |
818 } | 818 } |
819 } | 819 } |
820 | 820 |
821 void GrInOrderDrawBuffer::clipWillBeSet(const GrClipData* newClipData) { | 821 void GrInOrderDrawBuffer::clipWillBeSet(const GrClipData* newClipData) { |
822 INHERITED::clipWillBeSet(newClipData); | 822 INHERITED::clipWillBeSet(newClipData); |
823 fClipSet = true; | 823 fClipSet = true; |
824 fClipProxyState = kUnknown_ClipProxyState; | 824 fClipProxyState = kUnknown_ClipProxyState; |
825 } | 825 } |
OLD | NEW |