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 12 matching lines...) Expand all Loading... |
23 } | 23 } |
24 | 24 |
25 GrGpu* gpu = bufferedDrawTarget->getGpu(); | 25 GrGpu* gpu = bufferedDrawTarget->getGpu(); |
26 | 26 |
27 // Loop over all batches and generate geometry | 27 // Loop over all batches and generate geometry |
28 CmdBuffer::Iter genIter(fCmdBuffer); | 28 CmdBuffer::Iter genIter(fCmdBuffer); |
29 while (genIter.next()) { | 29 while (genIter.next()) { |
30 if (Cmd::kDrawBatch_CmdType == genIter->type()) { | 30 if (Cmd::kDrawBatch_CmdType == genIter->type()) { |
31 DrawBatch* db = reinterpret_cast<DrawBatch*>(genIter.get()); | 31 DrawBatch* db = reinterpret_cast<DrawBatch*>(genIter.get()); |
32 fBatchTarget.resetNumberOfDraws(); | 32 fBatchTarget.resetNumberOfDraws(); |
33 db->fBatch->generateGeometry(&fBatchTarget); | 33 db->batch()->generateGeometry(&fBatchTarget); |
34 db->fBatch->setNumberOfDraws(fBatchTarget.numberOfDraws()); | 34 db->batch()->setNumberOfDraws(fBatchTarget.numberOfDraws()); |
35 } | 35 } |
36 } | 36 } |
37 | 37 |
38 fBatchTarget.preFlush(); | 38 fBatchTarget.preFlush(); |
39 | 39 |
40 CmdBuffer::Iter iter(fCmdBuffer); | 40 CmdBuffer::Iter iter(fCmdBuffer); |
41 | 41 |
42 while (iter.next()) { | 42 while (iter.next()) { |
43 GrGpuTraceMarker newMarker("", -1); | 43 GrGpuTraceMarker newMarker("", -1); |
44 SkString traceString; | 44 SkString traceString; |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 gpu->clearStencilClip(fRect, fInsideClip, this->renderTarget()); | 102 gpu->clearStencilClip(fRect, fInsideClip, this->renderTarget()); |
103 } | 103 } |
104 | 104 |
105 void GrTargetCommands::CopySurface::execute(GrGpu* gpu) { | 105 void GrTargetCommands::CopySurface::execute(GrGpu* gpu) { |
106 gpu->copySurface(this->dst(), this->src(), fSrcRect, fDstPoint); | 106 gpu->copySurface(this->dst(), this->src(), fSrcRect, fDstPoint); |
107 } | 107 } |
108 | 108 |
109 void GrTargetCommands::XferBarrier::execute(GrGpu* gpu) { | 109 void GrTargetCommands::XferBarrier::execute(GrGpu* gpu) { |
110 gpu->xferBarrier(fRenderTarget.get(), fBarrierType); | 110 gpu->xferBarrier(fRenderTarget.get(), fBarrierType); |
111 } | 111 } |
OLD | NEW |