| 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" | |
| 11 #include "GrGpu.h" | 10 #include "GrGpu.h" |
| 12 #include "GrPipeline.h" | 11 #include "GrPipeline.h" |
| 13 #include "GrRenderTarget.h" | 12 #include "GrRenderTarget.h" |
| 14 #include "SkRect.h" | 13 #include "SkRect.h" |
| 15 #include "SkTypes.h" | 14 #include "SkTypes.h" |
| 16 | 15 |
| 16 #include "batches/GrBatch.h" |
| 17 |
| 17 GrImmediateDrawTarget::GrImmediateDrawTarget(GrContext* context) | 18 GrImmediateDrawTarget::GrImmediateDrawTarget(GrContext* context) |
| 18 : INHERITED(context) | 19 : INHERITED(context) |
| 19 , fBatchTarget(this->getGpu()) | 20 , fBatchTarget(this->getGpu()) |
| 20 , fDrawID(0) { | 21 , fDrawID(0) { |
| 21 } | 22 } |
| 22 | 23 |
| 23 GrImmediateDrawTarget::~GrImmediateDrawTarget() { | 24 GrImmediateDrawTarget::~GrImmediateDrawTarget() { |
| 24 this->reset(); | 25 this->reset(); |
| 25 } | 26 } |
| 26 | 27 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 | 99 |
| 99 void GrImmediateDrawTarget::recordXferBarrierIfNecessary(const GrPipeline* pipel
ine) { | 100 void GrImmediateDrawTarget::recordXferBarrierIfNecessary(const GrPipeline* pipel
ine) { |
| 100 const GrXferProcessor& xp = *pipeline->getXferProcessor(); | 101 const GrXferProcessor& xp = *pipeline->getXferProcessor(); |
| 101 GrRenderTarget* rt = pipeline->getRenderTarget(); | 102 GrRenderTarget* rt = pipeline->getRenderTarget(); |
| 102 | 103 |
| 103 GrXferBarrierType barrierType; | 104 GrXferBarrierType barrierType; |
| 104 if (xp.willNeedXferBarrier(rt, *this->caps(), &barrierType)) { | 105 if (xp.willNeedXferBarrier(rt, *this->caps(), &barrierType)) { |
| 105 this->getGpu()->xferBarrier(rt, barrierType); | 106 this->getGpu()->xferBarrier(rt, barrierType); |
| 106 } | 107 } |
| 107 } | 108 } |
| OLD | NEW |