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

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

Issue 1471053002: Don't create a GXPFactory when blend is SrcOver (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix compile Created 5 years, 1 month 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/SkGr.cpp ('k') | src/gpu/effects/GrConfigConversionEffect.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 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 newCoverage = SkScalarRoundToInt(hairlineCoverage * 0xff); 557 newCoverage = SkScalarRoundToInt(hairlineCoverage * 0xff);
558 558
559 if (!stroke->isHairlineStyle()) { 559 if (!stroke->isHairlineStyle()) {
560 stroke.writable()->setHairlineStyle(); 560 stroke.writable()->setHairlineStyle();
561 } 561 }
562 } 562 }
563 563
564 const bool isHairline = stroke->isHairlineStyle(); 564 const bool isHairline = stroke->isHairlineStyle();
565 565
566 // Save the current xp on the draw state so we can reset it if needed 566 // Save the current xp on the draw state so we can reset it if needed
567 SkAutoTUnref<const GrXPFactory> backupXPFactory(SkRef(pipelineBuilder->getXP Factory())); 567 const GrXPFactory* xpFactory = pipelineBuilder->getXPFactory();
568 SkAutoTUnref<const GrXPFactory> backupXPFactory(SkSafeRef(xpFactory));
568 // face culling doesn't make sense here 569 // face culling doesn't make sense here
569 SkASSERT(GrPipelineBuilder::kBoth_DrawFace == pipelineBuilder->getDrawFace() ); 570 SkASSERT(GrPipelineBuilder::kBoth_DrawFace == pipelineBuilder->getDrawFace() );
570 571
571 int passCount = 0; 572 int passCount = 0;
572 const GrStencilSettings* passes[3]; 573 const GrStencilSettings* passes[3];
573 GrPipelineBuilder::DrawFace drawFace[3]; 574 GrPipelineBuilder::DrawFace drawFace[3];
574 bool reverse = false; 575 bool reverse = false;
575 bool lastPassIsBounds; 576 bool lastPassIsBounds;
576 577
577 if (isHairline) { 578 if (isHairline) {
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
762 geometry.fColor = color; 763 geometry.fColor = color;
763 geometry.fPath = path; 764 geometry.fPath = path;
764 geometry.fTolerance = srcSpaceTol; 765 geometry.fTolerance = srcSpaceTol;
765 766
766 viewMatrix.mapRect(&bounds); 767 viewMatrix.mapRect(&bounds);
767 uint8_t coverage = GrRandomCoverage(random); 768 uint8_t coverage = GrRandomCoverage(random);
768 return DefaultPathBatch::Create(geometry, coverage, viewMatrix, true, bounds ); 769 return DefaultPathBatch::Create(geometry, coverage, viewMatrix, true, bounds );
769 } 770 }
770 771
771 #endif 772 #endif
OLDNEW
« no previous file with comments | « src/gpu/SkGr.cpp ('k') | src/gpu/effects/GrConfigConversionEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698