OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |