OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |