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

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

Issue 1541903002: added support for PLS path rendering (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix for ASAN failure Created 4 years, 10 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
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 "GrAAHairLinePathRenderer.h" 8 #include "GrAAHairLinePathRenderer.h"
9 9
10 #include "GrBatchFlushState.h" 10 #include "GrBatchFlushState.h"
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after
685 static GrDrawBatch* Create(const Geometry& geometry) { return new AAHairline Batch(geometry); } 685 static GrDrawBatch* Create(const Geometry& geometry) { return new AAHairline Batch(geometry); }
686 686
687 const char* name() const override { return "AAHairlineBatch"; } 687 const char* name() const override { return "AAHairlineBatch"; }
688 688
689 void computePipelineOptimizations(GrInitInvariantOutput* color, 689 void computePipelineOptimizations(GrInitInvariantOutput* color,
690 GrInitInvariantOutput* coverage, 690 GrInitInvariantOutput* coverage,
691 GrBatchToXPOverrides* overrides) const ove rride { 691 GrBatchToXPOverrides* overrides) const ove rride {
692 // When this is called on a batch, there is only one geometry bundle 692 // When this is called on a batch, there is only one geometry bundle
693 color->setKnownFourComponents(fGeoData[0].fColor); 693 color->setKnownFourComponents(fGeoData[0].fColor);
694 coverage->setUnknownSingleComponent(); 694 coverage->setUnknownSingleComponent();
695 overrides->fUsePLSDstRead = true;
696 } 695 }
697 696
698 private: 697 private:
699 void initBatchTracker(const GrXPOverridesForBatch& overrides) override { 698 void initBatchTracker(const GrXPOverridesForBatch& overrides) override {
700 // Handle any color overrides 699 // Handle any color overrides
701 if (!overrides.readsColor()) { 700 if (!overrides.readsColor()) {
702 fGeoData[0].fColor = GrColor_ILLEGAL; 701 fGeoData[0].fColor = GrColor_ILLEGAL;
703 } 702 }
704 overrides.getOverrideColorIfSet(&fGeoData[0].fColor); 703 overrides.getOverrideColorIfSet(&fGeoData[0].fColor);
705 704
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
994 GrColor color = GrRandomColor(random); 993 GrColor color = GrRandomColor(random);
995 SkMatrix viewMatrix = GrTest::TestMatrix(random); 994 SkMatrix viewMatrix = GrTest::TestMatrix(random);
996 GrStrokeInfo stroke(SkStrokeRec::kHairline_InitStyle); 995 GrStrokeInfo stroke(SkStrokeRec::kHairline_InitStyle);
997 SkPath path = GrTest::TestPath(random); 996 SkPath path = GrTest::TestPath(random);
998 SkIRect devClipBounds; 997 SkIRect devClipBounds;
999 devClipBounds.setEmpty(); 998 devClipBounds.setEmpty();
1000 return create_hairline_batch(color, viewMatrix, path, stroke, devClipBounds) ; 999 return create_hairline_batch(color, viewMatrix, path, stroke, devClipBounds) ;
1001 } 1000 }
1002 1001
1003 #endif 1002 #endif
OLDNEW
« no previous file with comments | « src/gpu/batches/GrAADistanceFieldPathRenderer.cpp ('k') | src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698