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" |
11 #include "GrPipeline.h" | 11 #include "GrPipeline.h" |
12 #include "GrRenderTarget.h" | 12 #include "GrRenderTarget.h" |
13 #include "SkRect.h" | 13 #include "SkRect.h" |
14 #include "SkTypes.h" | 14 #include "SkTypes.h" |
15 | 15 |
16 #include "batches/GrBatch.h" | 16 #include "batches/GrDrawBatch.h" |
| 17 #include "batches/GrVertexBatch.h" |
17 | 18 |
18 GrImmediateDrawTarget::GrImmediateDrawTarget(GrContext* context) | 19 GrImmediateDrawTarget::GrImmediateDrawTarget(GrContext* context) |
19 : INHERITED(context) | 20 : INHERITED(context) |
20 , fBatchTarget(this->getGpu()) | 21 , fBatchTarget(this->getGpu()) |
21 , fDrawID(0) { | 22 , fDrawID(0) { |
22 } | 23 } |
23 | 24 |
24 GrImmediateDrawTarget::~GrImmediateDrawTarget() { | 25 GrImmediateDrawTarget::~GrImmediateDrawTarget() { |
25 this->reset(); | 26 this->reset(); |
26 } | 27 } |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 this->getGpu()->discard(renderTarget); | 66 this->getGpu()->discard(renderTarget); |
66 } | 67 } |
67 | 68 |
68 void GrImmediateDrawTarget::onReset() { | 69 void GrImmediateDrawTarget::onReset() { |
69 fBatchTarget.reset(); | 70 fBatchTarget.reset(); |
70 } | 71 } |
71 | 72 |
72 void GrImmediateDrawTarget::onFlush() { | 73 void GrImmediateDrawTarget::onFlush() { |
73 ++fDrawID; | 74 ++fDrawID; |
74 } | 75 } |
OLD | NEW |