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

Side by Side Diff: src/gpu/batches/GrDrawVerticesBatch.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/GrDrawPathBatch.h ('k') | src/gpu/batches/GrNinePatch.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 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 "GrDrawVerticesBatch.h" 8 #include "GrDrawVerticesBatch.h"
9 9
10 #include "GrBatchFlushState.h" 10 #include "GrBatchFlushState.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 void GrDrawVerticesBatch::computePipelineOptimizations(GrInitInvariantOutput* co lor, 68 void GrDrawVerticesBatch::computePipelineOptimizations(GrInitInvariantOutput* co lor,
69 GrInitInvariantOutput* co verage, 69 GrInitInvariantOutput* co verage,
70 GrBatchToXPOverrides* ove rrides) const { 70 GrBatchToXPOverrides* ove rrides) const {
71 // When this is called on a batch, there is only one geometry bundle 71 // When this is called on a batch, there is only one geometry bundle
72 if (fVariableColor) { 72 if (fVariableColor) {
73 color->setUnknownFourComponents(); 73 color->setUnknownFourComponents();
74 } else { 74 } else {
75 color->setKnownFourComponents(fGeoData[0].fColor); 75 color->setKnownFourComponents(fGeoData[0].fColor);
76 } 76 }
77 coverage->setKnownSingleComponent(0xff); 77 coverage->setKnownSingleComponent(0xff);
78 overrides->fUsePLSDstRead = false;
79 } 78 }
80 79
81 void GrDrawVerticesBatch::initBatchTracker(const GrXPOverridesForBatch& override s) { 80 void GrDrawVerticesBatch::initBatchTracker(const GrXPOverridesForBatch& override s) {
82 SkASSERT(fGeoData.count() == 1); 81 SkASSERT(fGeoData.count() == 1);
83 GrColor overrideColor; 82 GrColor overrideColor;
84 if (overrides.getOverrideColorIfSet(&overrideColor)) { 83 if (overrides.getOverrideColorIfSet(&overrideColor)) {
85 fGeoData[0].fColor = overrideColor; 84 fGeoData[0].fColor = overrideColor;
86 fGeoData[0].fColors.reset(); 85 fGeoData[0].fColors.reset();
87 fVariableColor = false; 86 fVariableColor = false;
88 } 87 }
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 geometry.fColor = GrRandomColor(random); 317 geometry.fColor = GrRandomColor(random);
319 return GrDrawVerticesBatch::Create(geometry, type, viewMatrix, 318 return GrDrawVerticesBatch::Create(geometry, type, viewMatrix,
320 positions.begin(), vertexCount, 319 positions.begin(), vertexCount,
321 indices.begin(), hasIndices ? vertexCount : 0, 320 indices.begin(), hasIndices ? vertexCount : 0,
322 colors.begin(), 321 colors.begin(),
323 texCoords.begin(), 322 texCoords.begin(),
324 bounds); 323 bounds);
325 } 324 }
326 325
327 #endif 326 #endif
OLDNEW
« no previous file with comments | « src/gpu/batches/GrDrawPathBatch.h ('k') | src/gpu/batches/GrNinePatch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698