OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2010 Google Inc. | 3 * Copyright 2010 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 #include "GrDrawTarget.h" | 9 #include "GrDrawTarget.h" |
10 | 10 |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 bounds.roundOut(&ibounds); | 207 bounds.roundOut(&ibounds); |
208 // In multi-draw buffer all the batches use the same render target a
nd we won't need to | 208 // In multi-draw buffer all the batches use the same render target a
nd we won't need to |
209 // get the batchs bounds. | 209 // get the batchs bounds. |
210 if (GrRenderTarget* rt = fBatches[i]->renderTarget()) { | 210 if (GrRenderTarget* rt = fBatches[i]->renderTarget()) { |
211 fGpu->drawDebugWireRect(rt, ibounds, 0xFF000000 | random.nextU()
); | 211 fGpu->drawDebugWireRect(rt, ibounds, 0xFF000000 | random.nextU()
); |
212 } | 212 } |
213 } | 213 } |
214 fBatches[i]->draw(flushState); | 214 fBatches[i]->draw(flushState); |
215 } | 215 } |
216 | 216 |
217 fGpu->performFlushWorkaround(); | 217 fGpu->finishDrawTarget(); |
218 } | 218 } |
219 | 219 |
220 void GrDrawTarget::reset() { | 220 void GrDrawTarget::reset() { |
221 fBatches.reset(); | 221 fBatches.reset(); |
222 } | 222 } |
223 | 223 |
224 void GrDrawTarget::drawBatch(const GrPipelineBuilder& pipelineBuilder, GrDrawBat
ch* batch) { | 224 void GrDrawTarget::drawBatch(const GrPipelineBuilder& pipelineBuilder, GrDrawBat
ch* batch) { |
225 // Setup clip | 225 // Setup clip |
226 GrPipelineBuilder::AutoRestoreStencil ars; | 226 GrPipelineBuilder::AutoRestoreStencil ars; |
227 GrAppliedClip clip; | 227 GrAppliedClip clip; |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
530 } | 530 } |
531 | 531 |
532 return true; | 532 return true; |
533 } | 533 } |
534 | 534 |
535 void GrDrawTarget::clearStencilClip(const SkIRect& rect, bool insideClip, GrRend
erTarget* rt) { | 535 void GrDrawTarget::clearStencilClip(const SkIRect& rect, bool insideClip, GrRend
erTarget* rt) { |
536 GrBatch* batch = new GrClearStencilClipBatch(rect, insideClip, rt); | 536 GrBatch* batch = new GrClearStencilClipBatch(rect, insideClip, rt); |
537 this->recordBatch(batch); | 537 this->recordBatch(batch); |
538 batch->unref(); | 538 batch->unref(); |
539 } | 539 } |
OLD | NEW |