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

Side by Side Diff: src/gpu/batches/GrTessellatingPathRenderer.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
« no previous file with comments | « src/gpu/batches/GrTInstanceBatch.h ('k') | src/gpu/batches/GrTestBatch.h » ('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 2015 Google Inc. 2 * Copyright 2015 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 "GrTessellatingPathRenderer.h" 8 #include "GrTessellatingPathRenderer.h"
9 9
10 #include "GrBatchFlushState.h" 10 #include "GrBatchFlushState.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 return new TessellatingPathBatch(color, path, stroke, viewMatrix, clipBo unds); 84 return new TessellatingPathBatch(color, path, stroke, viewMatrix, clipBo unds);
85 } 85 }
86 86
87 const char* name() const override { return "TessellatingPathBatch"; } 87 const char* name() const override { return "TessellatingPathBatch"; }
88 88
89 void computePipelineOptimizations(GrInitInvariantOutput* color, 89 void computePipelineOptimizations(GrInitInvariantOutput* color,
90 GrInitInvariantOutput* coverage, 90 GrInitInvariantOutput* coverage,
91 GrBatchToXPOverrides* overrides) const ove rride { 91 GrBatchToXPOverrides* overrides) const ove rride {
92 color->setKnownFourComponents(fColor); 92 color->setKnownFourComponents(fColor);
93 coverage->setUnknownSingleComponent(); 93 coverage->setUnknownSingleComponent();
94 overrides->fUsePLSDstRead = false;
95 } 94 }
96 95
97 private: 96 private:
98 void initBatchTracker(const GrXPOverridesForBatch& overrides) override { 97 void initBatchTracker(const GrXPOverridesForBatch& overrides) override {
99 // Handle any color overrides 98 // Handle any color overrides
100 if (!overrides.readsColor()) { 99 if (!overrides.readsColor()) {
101 fColor = GrColor_ILLEGAL; 100 fColor = GrColor_ILLEGAL;
102 } 101 }
103 overrides.getOverrideColorIfSet(&fColor); 102 overrides.getOverrideColorIfSet(&fColor);
104 fPipelineInfo = overrides; 103 fPipelineInfo = overrides;
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 bool result = viewMatrix.invert(&vmi); 285 bool result = viewMatrix.invert(&vmi);
287 if (!result) { 286 if (!result) {
288 SkFAIL("Cannot invert matrix\n"); 287 SkFAIL("Cannot invert matrix\n");
289 } 288 }
290 vmi.mapRect(&clipBounds); 289 vmi.mapRect(&clipBounds);
291 GrStrokeInfo strokeInfo = GrTest::TestStrokeInfo(random); 290 GrStrokeInfo strokeInfo = GrTest::TestStrokeInfo(random);
292 return TessellatingPathBatch::Create(color, path, strokeInfo, viewMatrix, cl ipBounds); 291 return TessellatingPathBatch::Create(color, path, strokeInfo, viewMatrix, cl ipBounds);
293 } 292 }
294 293
295 #endif 294 #endif
OLDNEW
« no previous file with comments | « src/gpu/batches/GrTInstanceBatch.h ('k') | src/gpu/batches/GrTestBatch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698