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 "GrImmediateDrawTarget.h" | 8 #include "GrImmediateDrawTarget.h" |
9 | 9 |
10 #include "GrBatch.h" | 10 #include "GrBatch.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 | 32 |
33 if (!shouldDraw) { | 33 if (!shouldDraw) { |
34 pipeline->~GrPipeline(); | 34 pipeline->~GrPipeline(); |
35 return; | 35 return; |
36 } | 36 } |
37 | 37 |
38 batch->initBatchTracker(pipeline->infoForPrimitiveProcessor()); | 38 batch->initBatchTracker(pipeline->infoForPrimitiveProcessor()); |
39 | 39 |
40 fBatchTarget.resetNumberOfDraws(); | 40 fBatchTarget.resetNumberOfDraws(); |
41 | 41 |
42 batch->generateGeometry(&fBatchTarget, pipeline); | 42 batch->generateGeometry(&fBatchTarget); |
43 batch->setNumberOfDraws(fBatchTarget.numberOfDraws()); | 43 batch->setNumberOfDraws(fBatchTarget.numberOfDraws()); |
44 | 44 |
45 fBatchTarget.preFlush(); | 45 fBatchTarget.preFlush(); |
46 fBatchTarget.flushNext(batch->numberOfDraws()); | 46 fBatchTarget.flushNext(batch->numberOfDraws()); |
47 fBatchTarget.postFlush(); | 47 fBatchTarget.postFlush(); |
48 | 48 |
49 pipeline->~GrPipeline(); | 49 pipeline->~GrPipeline(); |
50 } | 50 } |
51 | 51 |
52 void GrImmediateDrawTarget::onClear(const SkIRect* rect, GrColor color, | 52 void GrImmediateDrawTarget::onClear(const SkIRect* rect, GrColor color, |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 | 98 |
99 void GrImmediateDrawTarget::recordXferBarrierIfNecessary(const GrPipeline* pipel
ine) { | 99 void GrImmediateDrawTarget::recordXferBarrierIfNecessary(const GrPipeline* pipel
ine) { |
100 const GrXferProcessor& xp = *pipeline->getXferProcessor(); | 100 const GrXferProcessor& xp = *pipeline->getXferProcessor(); |
101 GrRenderTarget* rt = pipeline->getRenderTarget(); | 101 GrRenderTarget* rt = pipeline->getRenderTarget(); |
102 | 102 |
103 GrXferBarrierType barrierType; | 103 GrXferBarrierType barrierType; |
104 if (xp.willNeedXferBarrier(rt, *this->caps(), &barrierType)) { | 104 if (xp.willNeedXferBarrier(rt, *this->caps(), &barrierType)) { |
105 this->getGpu()->xferBarrier(rt, barrierType); | 105 this->getGpu()->xferBarrier(rt, barrierType); |
106 } | 106 } |
107 } | 107 } |
OLD | NEW |