OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 "GrTargetCommands.h" | 8 #include "GrTargetCommands.h" |
9 | 9 |
10 #include "GrBufferedDrawTarget.h" | 10 #include "GrBufferedDrawTarget.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 gpu->buildProgramDesc(&fState->fDesc, *fState->fPrimitiveProcessor, *fSt
ate->getPipeline(), | 68 gpu->buildProgramDesc(&fState->fDesc, *fState->fPrimitiveProcessor, *fSt
ate->getPipeline(), |
69 fState->fBatchTracker); | 69 fState->fBatchTracker); |
70 fState->fCompiled = true; | 70 fState->fCompiled = true; |
71 } | 71 } |
72 GrPathRendering::DrawPathArgs args(fState->fPrimitiveProcessor.get(), fState
->getPipeline(), | 72 GrPathRendering::DrawPathArgs args(fState->fPrimitiveProcessor.get(), fState
->getPipeline(), |
73 &fState->fDesc, &fState->fBatchTracker, &
fStencilSettings); | 73 &fState->fDesc, &fState->fBatchTracker, &
fStencilSettings); |
74 gpu->pathRendering()->drawPaths(args, this->pathRange(), fIndices, fIndexTyp
e, fTransforms, | 74 gpu->pathRendering()->drawPaths(args, this->pathRange(), fIndices, fIndexTyp
e, fTransforms, |
75 fTransformType, fCount); | 75 fTransformType, fCount); |
76 } | 76 } |
77 | 77 |
78 void GrTargetCommands::DrawBatch::execute(GrGpu*) { | 78 void GrTargetCommands::DrawBatch::execute(GrGpu* gpu) { |
79 fBatchTarget->flushNext(fBatch->numberOfDraws()); | 79 fBatchTarget->flushNext(fBatch->numberOfDraws()); |
80 } | 80 } |
81 | 81 |
82 void GrTargetCommands::Clear::execute(GrGpu* gpu) { | 82 void GrTargetCommands::Clear::execute(GrGpu* gpu) { |
83 if (GrColor_ILLEGAL == fColor) { | 83 if (GrColor_ILLEGAL == fColor) { |
84 gpu->discard(this->renderTarget()); | 84 gpu->discard(this->renderTarget()); |
85 } else { | 85 } else { |
86 gpu->clear(fRect, fColor, this->renderTarget()); | 86 gpu->clear(fRect, fColor, this->renderTarget()); |
87 } | 87 } |
88 } | 88 } |
89 | 89 |
90 void GrTargetCommands::ClearStencilClip::execute(GrGpu* gpu) { | 90 void GrTargetCommands::ClearStencilClip::execute(GrGpu* gpu) { |
91 gpu->clearStencilClip(fRect, fInsideClip, this->renderTarget()); | 91 gpu->clearStencilClip(fRect, fInsideClip, this->renderTarget()); |
92 } | 92 } |
93 | 93 |
94 void GrTargetCommands::CopySurface::execute(GrGpu* gpu) { | 94 void GrTargetCommands::CopySurface::execute(GrGpu* gpu) { |
95 gpu->copySurface(this->dst(), this->src(), fSrcRect, fDstPoint); | 95 gpu->copySurface(this->dst(), this->src(), fSrcRect, fDstPoint); |
96 } | 96 } |
97 | |
98 void GrTargetCommands::XferBarrier::execute(GrGpu* gpu) { | |
99 gpu->xferBarrier(fRenderTarget.get(), fBarrierType); | |
100 } | |
OLD | NEW |