Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(107)

Side by Side Diff: src/gpu/GrDrawTarget.cpp

Issue 1471883002: Make stencil and cover path rendering have more reasonable bounds. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/gpu/GrDrawTarget.h ('k') | src/gpu/GrStencilAndCoverTextContext.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « src/gpu/GrDrawTarget.h ('k') | src/gpu/GrStencilAndCoverTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698