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

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

Issue 2041283002: Replace targetHasUnifiedMultisampling in GrPB constructor (Closed) Base URL: https://skia.googlesource.com/skia.git@fixdash
Patch Set: rebase Created 4 years, 6 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/batches/GrDashLinePathRenderer.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 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 } 555 }
556 } else { 556 } else {
557 bounds = path.getBounds(); 557 bounds = path.getBounds();
558 } 558 }
559 const SkMatrix& viewM = (reverse && viewMatrix.hasPerspective()) ? S kMatrix::I() : 559 const SkMatrix& viewM = (reverse && viewMatrix.hasPerspective()) ? S kMatrix::I() :
560 v iewMatrix; 560 v iewMatrix;
561 SkAutoTUnref<GrDrawBatch> batch( 561 SkAutoTUnref<GrDrawBatch> batch(
562 GrRectBatchFactory::CreateNonAAFill(color, viewM, bounds, nu llptr, 562 GrRectBatchFactory::CreateNonAAFill(color, viewM, bounds, nu llptr,
563 &localMatrix)); 563 &localMatrix));
564 564
565 GrPipelineBuilder pipelineBuilder(paint, drawContext->isUnifiedMulti sampled()); 565 GrPipelineBuilder pipelineBuilder(paint, drawContext->mustUseHWAA(pa int));
566 pipelineBuilder.setDrawFace(drawFace[p]); 566 pipelineBuilder.setDrawFace(drawFace[p]);
567 if (passes[p]) { 567 if (passes[p]) {
568 pipelineBuilder.setUserStencil(passes[p]); 568 pipelineBuilder.setUserStencil(passes[p]);
569 } else { 569 } else {
570 pipelineBuilder.setUserStencil(userStencilSettings); 570 pipelineBuilder.setUserStencil(userStencilSettings);
571 } 571 }
572 572
573 drawContext->drawBatch(pipelineBuilder, clip, batch); 573 drawContext->drawBatch(pipelineBuilder, clip, batch);
574 } else { 574 } else {
575 DefaultPathBatch::Geometry geometry; 575 DefaultPathBatch::Geometry geometry;
576 geometry.fColor = color; 576 geometry.fColor = color;
577 geometry.fPath = path; 577 geometry.fPath = path;
578 geometry.fTolerance = srcSpaceTol; 578 geometry.fTolerance = srcSpaceTol;
579 579
580 SkAutoTUnref<GrDrawBatch> batch(DefaultPathBatch::Create(geometry, n ewCoverage, 580 SkAutoTUnref<GrDrawBatch> batch(DefaultPathBatch::Create(geometry, n ewCoverage,
581 viewMatrix, isHairline, 581 viewMatrix, isHairline,
582 devBounds)) ; 582 devBounds)) ;
583 583
584 GrPipelineBuilder pipelineBuilder(paint, drawContext->isUnifiedMulti sampled()); 584 GrPipelineBuilder pipelineBuilder(paint, drawContext->mustUseHWAA(pa int));
585 pipelineBuilder.setDrawFace(drawFace[p]); 585 pipelineBuilder.setDrawFace(drawFace[p]);
586 if (passes[p]) { 586 if (passes[p]) {
587 pipelineBuilder.setUserStencil(passes[p]); 587 pipelineBuilder.setUserStencil(passes[p]);
588 } else { 588 } else {
589 pipelineBuilder.setUserStencil(userStencilSettings); 589 pipelineBuilder.setUserStencil(userStencilSettings);
590 } 590 }
591 if (passCount > 1) { 591 if (passCount > 1) {
592 pipelineBuilder.setDisableColorXPFactory(); 592 pipelineBuilder.setDisableColorXPFactory();
593 } 593 }
594 594
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 geometry.fColor = color; 663 geometry.fColor = color;
664 geometry.fPath = path; 664 geometry.fPath = path;
665 geometry.fTolerance = srcSpaceTol; 665 geometry.fTolerance = srcSpaceTol;
666 666
667 viewMatrix.mapRect(&bounds); 667 viewMatrix.mapRect(&bounds);
668 uint8_t coverage = GrRandomCoverage(random); 668 uint8_t coverage = GrRandomCoverage(random);
669 return DefaultPathBatch::Create(geometry, coverage, viewMatrix, true, bounds ); 669 return DefaultPathBatch::Create(geometry, coverage, viewMatrix, true, bounds );
670 } 670 }
671 671
672 #endif 672 #endif
OLDNEW
« no previous file with comments | « src/gpu/batches/GrDashLinePathRenderer.cpp ('k') | src/gpu/batches/GrMSAAPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698