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

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: 100-col fixes 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') | 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 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,
197 kHigh_GrSLPrecision));
197 if (hasColor) { 198 if (hasColor) {
198 fInColor = &this->addVertexAttrib(Attribute("inColor", kVec4ub_GrVer texAttribType)); 199 fInColor = &this->addVertexAttrib(Attribute("inColor", kVec4ub_GrVer texAttribType));
199 } 200 }
200 if (hasLocalCoord) { 201 if (hasLocalCoord) {
201 fInLocalCoords = &this->addVertexAttrib(Attribute("inLocalCoord", 202 fInLocalCoords = &this->addVertexAttrib(Attribute("inLocalCoord",
202 kVec2f_GrVertexAtt ribType)); 203 kVec2f_GrVertexAtt ribType));
203 this->setHasLocalCoords(); 204 this->setHasLocalCoords();
204 } 205 }
205 if (hasCoverage) { 206 if (hasCoverage) {
206 fInCoverage = &this->addVertexAttrib(Attribute("inCoverage", 207 fInCoverage = &this->addVertexAttrib(Attribute("inCoverage",
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 const SkMatrix& local Matrix, 260 const SkMatrix& local Matrix,
260 uint8_t coverage) { 261 uint8_t coverage) {
261 return DefaultGeoProc::Create(gpTypeFlags, 262 return DefaultGeoProc::Create(gpTypeFlags,
262 color, 263 color,
263 viewMatrix, 264 viewMatrix,
264 localMatrix, 265 localMatrix,
265 usesLocalCoords, 266 usesLocalCoords,
266 coverageIgnored, 267 coverageIgnored,
267 coverage); 268 coverage);
268 } 269 }
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrOvalRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698