| 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 "GrGpu.h" | 10 #include "GrGpu.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 GrVertexBatch* vertexBatch = static_cast<GrVertexBatch*>(batch); | 33 GrVertexBatch* vertexBatch = static_cast<GrVertexBatch*>(batch); |
| 34 vertexBatch->prepareDraws(&fBatchTarget); | 34 vertexBatch->prepareDraws(&fBatchTarget); |
| 35 vertexBatch->setNumberOfDraws(fBatchTarget.numberOfDraws()); | 35 vertexBatch->setNumberOfDraws(fBatchTarget.numberOfDraws()); |
| 36 | 36 |
| 37 fBatchTarget.preFlush(); | 37 fBatchTarget.preFlush(); |
| 38 fBatchTarget.flushNext(vertexBatch->numberOfDraws()); | 38 fBatchTarget.flushNext(vertexBatch->numberOfDraws()); |
| 39 fBatchTarget.postFlush(); | 39 fBatchTarget.postFlush(); |
| 40 #endif | 40 #endif |
| 41 } | 41 } |
| 42 | 42 |
| 43 void GrImmediateDrawTarget::onCopySurface(GrSurface* dst, | |
| 44 GrSurface* src, | |
| 45 const SkIRect& srcRect, | |
| 46 const SkIPoint& dstPoint) { | |
| 47 this->getGpu()->copySurface(dst, src, srcRect, dstPoint); | |
| 48 } | |
| 49 | |
| 50 void GrImmediateDrawTarget::onReset() {} | 43 void GrImmediateDrawTarget::onReset() {} |
| 51 | 44 |
| 52 void GrImmediateDrawTarget::onFlush() { | 45 void GrImmediateDrawTarget::onFlush() { |
| 53 ++fDrawID; | 46 ++fDrawID; |
| 54 } | 47 } |
| OLD | NEW |