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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 | 248 |
249 GrDrawPathBatchBase* batch = GrDrawPathBatch::Create(viewMatrix, color, path
); | 249 GrDrawPathBatchBase* batch = GrDrawPathBatch::Create(viewMatrix, color, path
); |
250 this->drawPathBatch(pipelineBuilder, batch, fill); | 250 this->drawPathBatch(pipelineBuilder, batch, fill); |
251 batch->unref(); | 251 batch->unref(); |
252 } | 252 } |
253 | 253 |
254 void GrDrawTarget::drawPathsFromRange(const GrPipelineBuilder& pipelineBuilder, | 254 void GrDrawTarget::drawPathsFromRange(const GrPipelineBuilder& pipelineBuilder, |
255 const SkMatrix& viewMatrix, | 255 const SkMatrix& viewMatrix, |
256 const SkMatrix& localMatrix, | 256 const SkMatrix& localMatrix, |
257 GrColor color, | 257 GrColor color, |
| 258 GrPathRange* range, |
258 GrPathRangeDraw* draw, | 259 GrPathRangeDraw* draw, |
259 GrPathRendering::FillType fill) { | 260 GrPathRendering::FillType fill) { |
260 GrDrawPathBatchBase* batch = GrDrawPathRangeBatch::Create(viewMatrix, localM
atrix, color, draw); | 261 GrDrawPathBatchBase* batch = GrDrawPathRangeBatch::Create(viewMatrix, localM
atrix, color, |
| 262 range, draw); |
261 this->drawPathBatch(pipelineBuilder, batch, fill); | 263 this->drawPathBatch(pipelineBuilder, batch, fill); |
262 batch->unref(); | 264 batch->unref(); |
263 } | 265 } |
264 | 266 |
265 void GrDrawTarget::drawPathBatch(const GrPipelineBuilder& pipelineBuilder, | 267 void GrDrawTarget::drawPathBatch(const GrPipelineBuilder& pipelineBuilder, |
266 GrDrawPathBatchBase* batch, | 268 GrDrawPathBatchBase* batch, |
267 GrPathRendering::FillType fill) { | 269 GrPathRendering::FillType fill) { |
268 // This looks like drawBatch() but there is an added wrinkle that stencil se
ttings get inserted | 270 // This looks like drawBatch() but there is an added wrinkle that stencil se
ttings get inserted |
269 // after setting up clipping but before onDrawBatch(). TODO: Figure out a be
tter model for | 271 // after setting up clipping but before onDrawBatch(). TODO: Figure out a be
tter model for |
270 // handling stencil settings WRT interactions between pipeline(builder), cli
pmaskmanager, and | 272 // handling stencil settings WRT interactions between pipeline(builder), cli
pmaskmanager, and |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
479 } | 481 } |
480 | 482 |
481 return true; | 483 return true; |
482 } | 484 } |
483 | 485 |
484 void GrDrawTarget::clearStencilClip(const SkIRect& rect, bool insideClip, GrRend
erTarget* rt) { | 486 void GrDrawTarget::clearStencilClip(const SkIRect& rect, bool insideClip, GrRend
erTarget* rt) { |
485 GrBatch* batch = new GrClearStencilClipBatch(rect, insideClip, rt); | 487 GrBatch* batch = new GrClearStencilClipBatch(rect, insideClip, rt); |
486 this->recordBatch(batch); | 488 this->recordBatch(batch); |
487 batch->unref(); | 489 batch->unref(); |
488 } | 490 } |
OLD | NEW |