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

Side by Side Diff: src/gpu/GrAARectRenderer.cpp

Issue 1227933003: fix for valgrind issue (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: more tweaks Created 5 years, 5 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 | « no previous file | src/gpu/GrAtlasTextContext.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 2012 Google Inc. 2 * Copyright 2012 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 "GrAARectRenderer.h" 8 #include "GrAARectRenderer.h"
9 #include "GrBatch.h" 9 #include "GrBatch.h"
10 #include "GrBatchTarget.h" 10 #include "GrBatchTarget.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 out->setKnownFourComponents(fGeoData[0].fColor); 70 out->setKnownFourComponents(fGeoData[0].fColor);
71 } 71 }
72 72
73 void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override { 73 void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override {
74 out->setUnknownSingleComponent(); 74 out->setUnknownSingleComponent();
75 } 75 }
76 76
77 void initBatchTracker(const GrPipelineInfo& init) override { 77 void initBatchTracker(const GrPipelineInfo& init) override {
78 // Handle any color overrides 78 // Handle any color overrides
79 if (!init.readsColor()) { 79 if (!init.readsColor()) {
80 fBatch.fColor = GrColor_ILLEGAL; 80 fGeoData[0].fColor = GrColor_ILLEGAL;
81 } 81 }
82 init.getOverrideColorIfSet(&fBatch.fColor); 82 init.getOverrideColorIfSet(&fGeoData[0].fColor);
83 83
84 // setup batch properties 84 // setup batch properties
85 fBatch.fColorIgnored = !init.readsColor(); 85 fBatch.fColorIgnored = !init.readsColor();
86 fBatch.fColor = fGeoData[0].fColor;
86 fBatch.fUsesLocalCoords = init.readsLocalCoords(); 87 fBatch.fUsesLocalCoords = init.readsLocalCoords();
87 fBatch.fCoverageIgnored = !init.readsCoverage(); 88 fBatch.fCoverageIgnored = !init.readsCoverage();
88 fBatch.fCanTweakAlphaForCoverage = init.canTweakAlphaForCoverage(); 89 fBatch.fCanTweakAlphaForCoverage = init.canTweakAlphaForCoverage();
89 } 90 }
90 91
91 void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline ) override { 92 void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline ) override {
92 bool canTweakAlphaForCoverage = this->canTweakAlphaForCoverage(); 93 bool canTweakAlphaForCoverage = this->canTweakAlphaForCoverage();
93 94
94 SkMatrix localMatrix; 95 SkMatrix localMatrix;
95 if (this->usesLocalCoords() && !this->viewMatrix().invert(&localMatrix)) { 96 if (this->usesLocalCoords() && !this->viewMatrix().invert(&localMatrix)) {
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 geo.fColor = GrRandomColor(random); 841 geo.fColor = GrRandomColor(random);
841 geo.fDevOutside = outside; 842 geo.fDevOutside = outside;
842 geo.fDevOutsideAssist = outsideAssist; 843 geo.fDevOutsideAssist = outsideAssist;
843 geo.fDevInside = inside; 844 geo.fDevInside = inside;
844 geo.fMiterStroke = miterStroke; 845 geo.fMiterStroke = miterStroke;
845 846
846 return AAStrokeRectBatch::Create(geo, GrTest::TestMatrix(random)); 847 return AAStrokeRectBatch::Create(geo, GrTest::TestMatrix(random));
847 } 848 }
848 849
849 #endif 850 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrAtlasTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698