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

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

Issue 691313003: Revert of Default geometry processor (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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()) ;
568 } 564 }
569 565
570 static inline void GenKey(const GrProcessor&, const GrGLCaps&, GrProcess orKeyBuilder*) {} 566 static inline void GenKey(const GrProcessor&, const GrGLCaps&, GrProcess orKeyBuilder*) {}
571 567
572 virtual void setData(const GrGLProgramDataManager&, const GrProcessor&) SK_OVERRIDE {} 568 virtual void setData(const GrGLProgramDataManager&, const GrProcessor&) SK_OVERRIDE {}
573 569
574 private: 570 private:
575 typedef GrGLGeometryProcessor INHERITED; 571 typedef GrGLGeometryProcessor INHERITED;
576 }; 572 };
577 573
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
710 vOffset, // start vertex 706 vOffset, // start vertex
711 0, // start index 707 0, // start index
712 draw.fVertexCnt, 708 draw.fVertexCnt,
713 draw.fIndexCnt, 709 draw.fIndexCnt,
714 &devBounds); 710 &devBounds);
715 vOffset += draw.fVertexCnt; 711 vOffset += draw.fVertexCnt;
716 } 712 }
717 713
718 return true; 714 return true;
719 } 715 }
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