| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 batch->generateGeometry(&fBatchTarget); | 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, |
| 53 bool canIgnoreRect, GrRenderTarget* renderTa
rget) { | 53 GrRenderTarget* renderTarget) { |
| 54 this->getGpu()->clear(rect, color, canIgnoreRect, renderTarget); | 54 this->getGpu()->clear(rect, color, renderTarget); |
| 55 } | 55 } |
| 56 | 56 |
| 57 void GrImmediateDrawTarget::onCopySurface(GrSurface* dst, | 57 void GrImmediateDrawTarget::onCopySurface(GrSurface* dst, |
| 58 GrSurface* src, | 58 GrSurface* src, |
| 59 const SkIRect& srcRect, | 59 const SkIRect& srcRect, |
| 60 const SkIPoint& dstPoint) { | 60 const SkIPoint& dstPoint) { |
| 61 this->getGpu()->copySurface(dst, src, srcRect, dstPoint); | 61 this->getGpu()->copySurface(dst, src, srcRect, dstPoint); |
| 62 } | 62 } |
| 63 | 63 |
| 64 void GrImmediateDrawTarget::clearStencilClip(const SkIRect& rect, | 64 void GrImmediateDrawTarget::clearStencilClip(const SkIRect& rect, |
| (...skipping 33 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 |