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

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

Issue 1145273002: Use high precision vertex attributes. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Change other inPosition * fViewMatrix users to highp Created 5 years, 7 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/GrOvalRenderer.cpp » ('j') | src/gpu/GrOvalRenderer.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 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 "GrDefaultGeoProcFactory.h" 8 #include "GrDefaultGeoProcFactory.h"
9 9
10 #include "GrInvariantOutput.h" 10 #include "GrInvariantOutput.h"
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 , fViewMatrix(viewMatrix) 186 , fViewMatrix(viewMatrix)
187 , fLocalMatrix(localMatrix) 187 , fLocalMatrix(localMatrix)
188 , fCoverage(coverage) 188 , fCoverage(coverage)
189 , fFlags(gpTypeFlags) 189 , fFlags(gpTypeFlags)
190 , fUsesLocalCoords(usesLocalCoords) 190 , fUsesLocalCoords(usesLocalCoords)
191 , fCoverageIgnored(coverageIgnored) { 191 , fCoverageIgnored(coverageIgnored) {
192 this->initClassID<DefaultGeoProc>(); 192 this->initClassID<DefaultGeoProc>();
193 bool hasColor = SkToBool(gpTypeFlags & GrDefaultGeoProcFactory::kColor_G PType); 193 bool hasColor = SkToBool(gpTypeFlags & GrDefaultGeoProcFactory::kColor_G PType);
194 bool hasLocalCoord = SkToBool(gpTypeFlags & GrDefaultGeoProcFactory::kLo calCoord_GPType); 194 bool hasLocalCoord = SkToBool(gpTypeFlags & GrDefaultGeoProcFactory::kLo calCoord_GPType);
195 bool hasCoverage = SkToBool(gpTypeFlags & GrDefaultGeoProcFactory::kCove rage_GPType); 195 bool hasCoverage = SkToBool(gpTypeFlags & GrDefaultGeoProcFactory::kCove rage_GPType);
196 fInPosition = &this->addVertexAttrib(Attribute("inPosition", kVec2f_GrVe rtexAttribType)); 196 fInPosition = &this->addVertexAttrib(Attribute("inPosition", kVec2f_GrVe rtexAttribType, kHigh_GrSLPrecision));
joshualitt 2015/05/20 20:36:10 newline
Stephen White 2015/05/20 20:47:43 Done.
197 if (hasColor) { 197 if (hasColor) {
198 fInColor = &this->addVertexAttrib(Attribute("inColor", kVec4ub_GrVer texAttribType)); 198 fInColor = &this->addVertexAttrib(Attribute("inColor", kVec4ub_GrVer texAttribType));
199 } 199 }
200 if (hasLocalCoord) { 200 if (hasLocalCoord) {
201 fInLocalCoords = &this->addVertexAttrib(Attribute("inLocalCoord", 201 fInLocalCoords = &this->addVertexAttrib(Attribute("inLocalCoord",
202 kVec2f_GrVertexAtt ribType)); 202 kVec2f_GrVertexAtt ribType));
203 this->setHasLocalCoords(); 203 this->setHasLocalCoords();
204 } 204 }
205 if (hasCoverage) { 205 if (hasCoverage) {
206 fInCoverage = &this->addVertexAttrib(Attribute("inCoverage", 206 fInCoverage = &this->addVertexAttrib(Attribute("inCoverage",
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 const SkMatrix& local Matrix, 259 const SkMatrix& local Matrix,
260 uint8_t coverage) { 260 uint8_t coverage) {
261 return DefaultGeoProc::Create(gpTypeFlags, 261 return DefaultGeoProc::Create(gpTypeFlags,
262 color, 262 color,
263 viewMatrix, 263 viewMatrix,
264 localMatrix, 264 localMatrix,
265 usesLocalCoords, 265 usesLocalCoords,
266 coverageIgnored, 266 coverageIgnored,
267 coverage); 267 coverage);
268 } 268 }
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrOvalRenderer.cpp » ('j') | src/gpu/GrOvalRenderer.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698