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

Side by Side Diff: src/gpu/batches/GrMSAAPathRenderer.cpp

Issue 2248323003: Simplify adding attributes to GrGeometryProcessor (Closed) Base URL: https://chromium.googlesource.com/skia.git@xformhelper
Patch Set: Revert removal of fAttribNames Created 4 years, 4 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/GrAnalyticRectBatch.cpp ('k') | src/gpu/batches/GrPLSPathRenderer.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 2016 Google Inc. 2 * Copyright 2016 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 "GrMSAAPathRenderer.h" 8 #include "GrMSAAPathRenderer.h"
9 9
10 #include "GrAuditTrail.h" 10 #include "GrAuditTrail.h"
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 } 188 }
189 189
190 virtual GrGLSLPrimitiveProcessor* createGLSLInstance(const GrGLSLCaps&) cons t override { 190 virtual GrGLSLPrimitiveProcessor* createGLSLInstance(const GrGLSLCaps&) cons t override {
191 return new GLSLProcessor(*this); 191 return new GLSLProcessor(*this);
192 } 192 }
193 193
194 private: 194 private:
195 MSAAQuadProcessor(const SkMatrix& viewMatrix) 195 MSAAQuadProcessor(const SkMatrix& viewMatrix)
196 : fViewMatrix(viewMatrix) { 196 : fViewMatrix(viewMatrix) {
197 this->initClassID<MSAAQuadProcessor>(); 197 this->initClassID<MSAAQuadProcessor>();
198 fInPosition = &this->addVertexAttrib(Attribute("inPosition", kVec2f_GrVe rtexAttribType, 198 fInPosition = &this->addVertexAttrib("inPosition", kVec2f_GrVertexAttrib Type,
199 kHigh_GrSLPrecision)); 199 kHigh_GrSLPrecision);
200 fInUV = &this->addVertexAttrib(Attribute("inUV", kVec2f_GrVertexAttribTy pe, 200 fInUV = &this->addVertexAttrib("inUV", kVec2f_GrVertexAttribType, kHigh_ GrSLPrecision);
201 kHigh_GrSLPrecision)); 201 fInColor = &this->addVertexAttrib("inColor", kVec4ub_GrVertexAttribType) ;
202 fInColor = &this->addVertexAttrib(Attribute("inColor", kVec4ub_GrVertexA ttribType));
203 this->setSampleShading(1.0f); 202 this->setSampleShading(1.0f);
204 } 203 }
205 204
206 const Attribute* fInPosition; 205 const Attribute* fInPosition;
207 const Attribute* fInUV; 206 const Attribute* fInUV;
208 const Attribute* fInColor; 207 const Attribute* fInColor;
209 SkMatrix fViewMatrix; 208 SkMatrix fViewMatrix;
210 209
211 GR_DECLARE_GEOMETRY_PROCESSOR_TEST; 210 GR_DECLARE_GEOMETRY_PROCESSOR_TEST;
212 211
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
706 705
707 GrPaint paint; 706 GrPaint paint;
708 paint.setXPFactory(GrDisableColorXPFactory::Make()); 707 paint.setXPFactory(GrDisableColorXPFactory::Make());
709 paint.setAntiAlias(args.fIsAA); 708 paint.setAntiAlias(args.fIsAA);
710 709
711 this->internalDrawPath(args.fDrawContext, paint, GrUserStencilSettings::kUnu sed, *args.fClip, 710 this->internalDrawPath(args.fDrawContext, paint, GrUserStencilSettings::kUnu sed, *args.fClip,
712 *args.fViewMatrix, *args.fShape, true); 711 *args.fViewMatrix, *args.fShape, true);
713 } 712 }
714 713
715 //////////////////////////////////////////////////////////////////////////////// /////////////////// 714 //////////////////////////////////////////////////////////////////////////////// ///////////////////
OLDNEW
« no previous file with comments | « src/gpu/batches/GrAnalyticRectBatch.cpp ('k') | src/gpu/batches/GrPLSPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698