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 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 this->drawPathBatch(pipelineBuilder, batch, fill); | 315 this->drawPathBatch(pipelineBuilder, batch, fill); |
316 batch->unref(); | 316 batch->unref(); |
317 } | 317 } |
318 | 318 |
319 void GrDrawTarget::drawPathsFromRange(const GrPipelineBuilder& pipelineBuilder, | 319 void GrDrawTarget::drawPathsFromRange(const GrPipelineBuilder& pipelineBuilder, |
320 const SkMatrix& viewMatrix, | 320 const SkMatrix& viewMatrix, |
321 const SkMatrix& localMatrix, | 321 const SkMatrix& localMatrix, |
322 GrColor color, | 322 GrColor color, |
323 GrPathRange* range, | 323 GrPathRange* range, |
324 GrPathRangeDraw* draw, | 324 GrPathRangeDraw* draw, |
325 GrPathRendering::FillType fill) { | 325 GrPathRendering::FillType fill, |
| 326 const SkRect& bounds) { |
326 GrDrawPathBatchBase* batch = GrDrawPathRangeBatch::Create(viewMatrix, localM
atrix, color, | 327 GrDrawPathBatchBase* batch = GrDrawPathRangeBatch::Create(viewMatrix, localM
atrix, color, |
327 range, draw); | 328 range, draw, bound
s); |
328 this->drawPathBatch(pipelineBuilder, batch, fill); | 329 this->drawPathBatch(pipelineBuilder, batch, fill); |
329 batch->unref(); | 330 batch->unref(); |
330 } | 331 } |
331 | 332 |
332 void GrDrawTarget::drawPathBatch(const GrPipelineBuilder& pipelineBuilder, | 333 void GrDrawTarget::drawPathBatch(const GrPipelineBuilder& pipelineBuilder, |
333 GrDrawPathBatchBase* batch, | 334 GrDrawPathBatchBase* batch, |
334 GrPathRendering::FillType fill) { | 335 GrPathRendering::FillType fill) { |
335 // This looks like drawBatch() but there is an added wrinkle that stencil se
ttings get inserted | 336 // This looks like drawBatch() but there is an added wrinkle that stencil se
ttings get inserted |
336 // after setting up clipping but before onDrawBatch(). TODO: Figure out a be
tter model for | 337 // after setting up clipping but before onDrawBatch(). TODO: Figure out a be
tter model for |
337 // handling stencil settings WRT interactions between pipeline(builder), cli
pmaskmanager, and | 338 // handling stencil settings WRT interactions between pipeline(builder), cli
pmaskmanager, and |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
549 } | 550 } |
550 | 551 |
551 return true; | 552 return true; |
552 } | 553 } |
553 | 554 |
554 void GrDrawTarget::clearStencilClip(const SkIRect& rect, bool insideClip, GrRend
erTarget* rt) { | 555 void GrDrawTarget::clearStencilClip(const SkIRect& rect, bool insideClip, GrRend
erTarget* rt) { |
555 GrBatch* batch = new GrClearStencilClipBatch(rect, insideClip, rt); | 556 GrBatch* batch = new GrClearStencilClipBatch(rect, insideClip, rt); |
556 this->recordBatch(batch); | 557 this->recordBatch(batch); |
557 batch->unref(); | 558 batch->unref(); |
558 } | 559 } |
OLD | NEW |