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

Side by Side Diff: src/gpu/batches/GrDefaultPathRenderer.cpp

Issue 2125333002: Add choke point for modifying non-AA rect draws (e.g., applying clipping) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix infinite optimization loop Created 4 years, 5 months 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.cpp ('k') | src/gpu/batches/GrMSAAPathRenderer.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 * Copyright 2011 Google Inc. 2 * Copyright 2011 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 "GrDefaultPathRenderer.h" 8 #include "GrDefaultPathRenderer.h"
9 9
10 #include "GrBatchFlushState.h" 10 #include "GrBatchFlushState.h"
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 } 547 }
548 } else { 548 } else {
549 bounds = path.getBounds(); 549 bounds = path.getBounds();
550 } 550 }
551 const SkMatrix& viewM = (reverse && viewMatrix.hasPerspective()) ? S kMatrix::I() : 551 const SkMatrix& viewM = (reverse && viewMatrix.hasPerspective()) ? S kMatrix::I() :
552 v iewMatrix; 552 v iewMatrix;
553 SkAutoTUnref<GrDrawBatch> batch( 553 SkAutoTUnref<GrDrawBatch> batch(
554 GrRectBatchFactory::CreateNonAAFill(paint.getColor(), viewM, bounds, nullptr, 554 GrRectBatchFactory::CreateNonAAFill(paint.getColor(), viewM, bounds, nullptr,
555 &localMatrix)); 555 &localMatrix));
556 556
557 SkASSERT(GrPipelineBuilder::kBoth_DrawFace == drawFace[p]);
557 GrPipelineBuilder pipelineBuilder(paint, drawContext->mustUseHWAA(pa int)); 558 GrPipelineBuilder pipelineBuilder(paint, drawContext->mustUseHWAA(pa int));
558 pipelineBuilder.setDrawFace(drawFace[p]); 559 pipelineBuilder.setDrawFace(drawFace[p]);
559 if (passes[p]) { 560 if (passes[p]) {
560 pipelineBuilder.setUserStencil(passes[p]); 561 pipelineBuilder.setUserStencil(passes[p]);
561 } else { 562 } else {
562 pipelineBuilder.setUserStencil(userStencilSettings); 563 pipelineBuilder.setUserStencil(userStencilSettings);
563 } 564 }
564 565
565 drawContext->drawBatch(pipelineBuilder, clip, batch); 566 drawContext->drawBatch(pipelineBuilder, clip, batch);
566 } else { 567 } else {
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 SkRect bounds = path.getBounds(); 636 SkRect bounds = path.getBounds();
636 SkScalar tol = GrPathUtils::kDefaultTolerance; 637 SkScalar tol = GrPathUtils::kDefaultTolerance;
637 SkScalar srcSpaceTol = GrPathUtils::scaleToleranceToSrc(tol, viewMatrix, bou nds); 638 SkScalar srcSpaceTol = GrPathUtils::scaleToleranceToSrc(tol, viewMatrix, bou nds);
638 639
639 viewMatrix.mapRect(&bounds); 640 viewMatrix.mapRect(&bounds);
640 uint8_t coverage = GrRandomCoverage(random); 641 uint8_t coverage = GrRandomCoverage(random);
641 return new DefaultPathBatch(color, path, srcSpaceTol, coverage, viewMatrix, true, bounds); 642 return new DefaultPathBatch(color, path, srcSpaceTol, coverage, viewMatrix, true, bounds);
642 } 643 }
643 644
644 #endif 645 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrDrawTarget.cpp ('k') | src/gpu/batches/GrMSAAPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698