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

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

Issue 2136643002: Revert of 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: 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]);
558 GrPipelineBuilder pipelineBuilder(paint, drawContext->mustUseHWAA(pa int)); 557 GrPipelineBuilder pipelineBuilder(paint, drawContext->mustUseHWAA(pa int));
559 pipelineBuilder.setDrawFace(drawFace[p]); 558 pipelineBuilder.setDrawFace(drawFace[p]);
560 if (passes[p]) { 559 if (passes[p]) {
561 pipelineBuilder.setUserStencil(passes[p]); 560 pipelineBuilder.setUserStencil(passes[p]);
562 } else { 561 } else {
563 pipelineBuilder.setUserStencil(userStencilSettings); 562 pipelineBuilder.setUserStencil(userStencilSettings);
564 } 563 }
565 564
566 drawContext->drawBatch(pipelineBuilder, clip, batch); 565 drawContext->drawBatch(pipelineBuilder, clip, batch);
567 } else { 566 } else {
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 SkRect bounds = path.getBounds(); 635 SkRect bounds = path.getBounds();
637 SkScalar tol = GrPathUtils::kDefaultTolerance; 636 SkScalar tol = GrPathUtils::kDefaultTolerance;
638 SkScalar srcSpaceTol = GrPathUtils::scaleToleranceToSrc(tol, viewMatrix, bou nds); 637 SkScalar srcSpaceTol = GrPathUtils::scaleToleranceToSrc(tol, viewMatrix, bou nds);
639 638
640 viewMatrix.mapRect(&bounds); 639 viewMatrix.mapRect(&bounds);
641 uint8_t coverage = GrRandomCoverage(random); 640 uint8_t coverage = GrRandomCoverage(random);
642 return new DefaultPathBatch(color, path, srcSpaceTol, coverage, viewMatrix, true, bounds); 641 return new DefaultPathBatch(color, path, srcSpaceTol, coverage, viewMatrix, true, bounds);
643 } 642 }
644 643
645 #endif 644 #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