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

Side by Side Diff: src/gpu/batches/GrAAConvexPathRenderer.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/GrPrimitiveProcessor.h ('k') | src/gpu/batches/GrAnalyticRectBatch.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 "GrAAConvexPathRenderer.h" 8 #include "GrAAConvexPathRenderer.h"
9 9
10 #include "GrAAConvexTessellator.h" 10 #include "GrAAConvexTessellator.h"
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 GrGLSLPrimitiveProcessor* createGLSLInstance(const GrGLSLCaps&) const overri de { 646 GrGLSLPrimitiveProcessor* createGLSLInstance(const GrGLSLCaps&) const overri de {
647 return new GLSLProcessor(); 647 return new GLSLProcessor();
648 } 648 }
649 649
650 private: 650 private:
651 QuadEdgeEffect(GrColor color, const SkMatrix& localMatrix, bool usesLocalCoo rds) 651 QuadEdgeEffect(GrColor color, const SkMatrix& localMatrix, bool usesLocalCoo rds)
652 : fColor(color) 652 : fColor(color)
653 , fLocalMatrix(localMatrix) 653 , fLocalMatrix(localMatrix)
654 , fUsesLocalCoords(usesLocalCoords) { 654 , fUsesLocalCoords(usesLocalCoords) {
655 this->initClassID<QuadEdgeEffect>(); 655 this->initClassID<QuadEdgeEffect>();
656 fInPosition = &this->addVertexAttrib(Attribute("inPosition", kVec2f_GrVe rtexAttribType)); 656 fInPosition = &this->addVertexAttrib("inPosition", kVec2f_GrVertexAttrib Type);
657 fInQuadEdge = &this->addVertexAttrib(Attribute("inQuadEdge", kVec4f_GrVe rtexAttribType)); 657 fInQuadEdge = &this->addVertexAttrib("inQuadEdge", kVec4f_GrVertexAttrib Type);
658 } 658 }
659 659
660 const Attribute* fInPosition; 660 const Attribute* fInPosition;
661 const Attribute* fInQuadEdge; 661 const Attribute* fInQuadEdge;
662 GrColor fColor; 662 GrColor fColor;
663 SkMatrix fLocalMatrix; 663 SkMatrix fLocalMatrix;
664 bool fUsesLocalCoords; 664 bool fUsesLocalCoords;
665 665
666 GR_DECLARE_GEOMETRY_PROCESSOR_TEST; 666 GR_DECLARE_GEOMETRY_PROCESSOR_TEST;
667 667
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
1017 1017
1018 DRAW_BATCH_TEST_DEFINE(AAConvexPathBatch) { 1018 DRAW_BATCH_TEST_DEFINE(AAConvexPathBatch) {
1019 GrColor color = GrRandomColor(random); 1019 GrColor color = GrRandomColor(random);
1020 SkMatrix viewMatrix = GrTest::TestMatrixInvertible(random); 1020 SkMatrix viewMatrix = GrTest::TestMatrixInvertible(random);
1021 SkPath path = GrTest::TestPathConvex(random); 1021 SkPath path = GrTest::TestPathConvex(random);
1022 1022
1023 return new AAConvexPathBatch(color, viewMatrix, path); 1023 return new AAConvexPathBatch(color, viewMatrix, path);
1024 } 1024 }
1025 1025
1026 #endif 1026 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrPrimitiveProcessor.h ('k') | src/gpu/batches/GrAnalyticRectBatch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698