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

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

Issue 1709153002: Add more specialized fragment builders (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Make MSVC happy Created 4 years, 10 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/GrPathProcessor.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 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "GrAAConvexPathRenderer.h" 9 #include "GrAAConvexPathRenderer.h"
10 10
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 GrGLSLVaryingHandler* varyingHandler = args.fVaryingHandler; 555 GrGLSLVaryingHandler* varyingHandler = args.fVaryingHandler;
556 GrGLSLUniformHandler* uniformHandler = args.fUniformHandler; 556 GrGLSLUniformHandler* uniformHandler = args.fUniformHandler;
557 557
558 // emit attributes 558 // emit attributes
559 varyingHandler->emitAttributes(qe); 559 varyingHandler->emitAttributes(qe);
560 560
561 GrGLSLVertToFrag v(kVec4f_GrSLType); 561 GrGLSLVertToFrag v(kVec4f_GrSLType);
562 varyingHandler->addVarying("QuadEdge", &v); 562 varyingHandler->addVarying("QuadEdge", &v);
563 vertBuilder->codeAppendf("%s = %s;", v.vsOut(), qe.inQuadEdge()->fNa me); 563 vertBuilder->codeAppendf("%s = %s;", v.vsOut(), qe.inQuadEdge()->fNa me);
564 564
565 GrGLSLFragmentBuilder* fragBuilder = args.fFragBuilder; 565 GrGLSLPPFragmentBuilder* fragBuilder = args.fFragBuilder;
566 // Setup pass through color 566 // Setup pass through color
567 if (!qe.colorIgnored()) { 567 if (!qe.colorIgnored()) {
568 this->setupUniformColor(fragBuilder, uniformHandler, args.fOutpu tColor, 568 this->setupUniformColor(fragBuilder, uniformHandler, args.fOutpu tColor,
569 &fColorUniform); 569 &fColorUniform);
570 } 570 }
571 571
572 // Setup position 572 // Setup position
573 this->setupPosition(vertBuilder, gpArgs, qe.inPosition()->fName); 573 this->setupPosition(vertBuilder, gpArgs, qe.inPosition()->fName);
574 574
575 // emit transforms 575 // emit transforms
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
1025 DRAW_BATCH_TEST_DEFINE(AAConvexPathBatch) { 1025 DRAW_BATCH_TEST_DEFINE(AAConvexPathBatch) {
1026 AAConvexPathBatch::Geometry geometry; 1026 AAConvexPathBatch::Geometry geometry;
1027 geometry.fColor = GrRandomColor(random); 1027 geometry.fColor = GrRandomColor(random);
1028 geometry.fViewMatrix = GrTest::TestMatrixInvertible(random); 1028 geometry.fViewMatrix = GrTest::TestMatrixInvertible(random);
1029 geometry.fPath = GrTest::TestPathConvex(random); 1029 geometry.fPath = GrTest::TestPathConvex(random);
1030 1030
1031 return AAConvexPathBatch::Create(geometry); 1031 return AAConvexPathBatch::Create(geometry);
1032 } 1032 }
1033 1033
1034 #endif 1034 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrPathProcessor.cpp ('k') | src/gpu/batches/GrPLSPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698