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

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

Issue 678953002: Default geometry processor (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix Created 6 years, 1 month 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 | « include/gpu/GrGeometryProcessor.h ('k') | src/gpu/GrAARectRenderer.h » ('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 543 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 fsBuilder->codeAppendf("edgeAlpha = " 554 fsBuilder->codeAppendf("edgeAlpha = "
555 "clamp(0.5 - edgeAlpha / length(gF), 0.0, 1.0 );}"); 555 "clamp(0.5 - edgeAlpha / length(gF), 0.0, 1.0 );}");
556 556
557 557
558 fsBuilder->codeAppendf("%s = %s;", args.fOutput, 558 fsBuilder->codeAppendf("%s = %s;", args.fOutput,
559 (GrGLSLExpr4(args.fInput) * GrGLSLExpr1("edge Alpha")).c_str()); 559 (GrGLSLExpr4(args.fInput) * GrGLSLExpr1("edge Alpha")).c_str());
560 560
561 const GrShaderVar& inQuadEdge = args.fGP.cast<QuadEdgeEffect>().inQu adEdge(); 561 const GrShaderVar& inQuadEdge = args.fGP.cast<QuadEdgeEffect>().inQu adEdge();
562 GrGLVertexBuilder* vsBuilder = args.fPB->getVertexShaderBuilder(); 562 GrGLVertexBuilder* vsBuilder = args.fPB->getVertexShaderBuilder();
563 vsBuilder->codeAppendf("\t%s = %s;\n", v.vsOut(), inQuadEdge.c_str() ); 563 vsBuilder->codeAppendf("\t%s = %s;\n", v.vsOut(), inQuadEdge.c_str() );
564
565 // setup position varying
566 vsBuilder->codeAppendf("%s = %s * vec3(%s, 1);", vsBuilder->glPositi on(),
567 vsBuilder->uViewM(), vsBuilder->inPosition()) ;
564 } 568 }
565 569
566 static inline void GenKey(const GrProcessor&, const GrGLCaps&, GrProcess orKeyBuilder*) {} 570 static inline void GenKey(const GrProcessor&, const GrGLCaps&, GrProcess orKeyBuilder*) {}
567 571
568 virtual void setData(const GrGLProgramDataManager&, const GrProcessor&) SK_OVERRIDE {} 572 virtual void setData(const GrGLProgramDataManager&, const GrProcessor&) SK_OVERRIDE {}
569 573
570 private: 574 private:
571 typedef GrGLGeometryProcessor INHERITED; 575 typedef GrGLGeometryProcessor INHERITED;
572 }; 576 };
573 577
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
706 vOffset, // start vertex 710 vOffset, // start vertex
707 0, // start index 711 0, // start index
708 draw.fVertexCnt, 712 draw.fVertexCnt,
709 draw.fIndexCnt, 713 draw.fIndexCnt,
710 &devBounds); 714 &devBounds);
711 vOffset += draw.fVertexCnt; 715 vOffset += draw.fVertexCnt;
712 } 716 }
713 717
714 return true; 718 return true;
715 } 719 }
OLDNEW
« no previous file with comments | « include/gpu/GrGeometryProcessor.h ('k') | src/gpu/GrAARectRenderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698