OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 "GrAAHairLinePathRenderer.h" | 8 #include "GrAAHairLinePathRenderer.h" |
9 | 9 |
10 #include "GrContext.h" | 10 #include "GrContext.h" |
(...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
796 | 796 |
797 SkString modulate; | 797 SkString modulate; |
798 GrGLSLModulatef<4>(&modulate, inputColor, "edgeAlpha"); | 798 GrGLSLModulatef<4>(&modulate, inputColor, "edgeAlpha"); |
799 builder->fsCodeAppendf("\t%s = %s;\n", outputColor, modulate.c_str()
); | 799 builder->fsCodeAppendf("\t%s = %s;\n", outputColor, modulate.c_str()
); |
800 } | 800 } |
801 | 801 |
802 static inline EffectKey GenKey(const GrDrawEffect& drawEffect, const GrG
LCaps&) { | 802 static inline EffectKey GenKey(const GrDrawEffect& drawEffect, const GrG
LCaps&) { |
803 return 0x0; | 803 return 0x0; |
804 } | 804 } |
805 | 805 |
806 virtual void setData(const GrGLUniformManager&, const GrDrawEffect&) SK_
OVERRIDE {} | 806 virtual void setData(const GrGLContext&, const GrDrawEffect&) SK_OVERRID
E {} |
807 | 807 |
808 private: | 808 private: |
809 typedef GrGLEffect INHERITED; | 809 typedef GrGLEffect INHERITED; |
810 }; | 810 }; |
811 | 811 |
812 private: | 812 private: |
813 HairConicEdgeEffect() { | 813 HairConicEdgeEffect() { |
814 this->addVertexAttrib(kVec4f_GrSLType); | 814 this->addVertexAttrib(kVec4f_GrSLType); |
815 } | 815 } |
816 | 816 |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
895 GrGLSLModulatef<4>(&modulate, inputColor, "edgeAlpha"); | 895 GrGLSLModulatef<4>(&modulate, inputColor, "edgeAlpha"); |
896 builder->fsCodeAppendf("\t%s = %s;\n", outputColor, modulate.c_str()
); | 896 builder->fsCodeAppendf("\t%s = %s;\n", outputColor, modulate.c_str()
); |
897 | 897 |
898 builder->vsCodeAppendf("\t%s = %s;\n", vsName, attrName->c_str()); | 898 builder->vsCodeAppendf("\t%s = %s;\n", vsName, attrName->c_str()); |
899 } | 899 } |
900 | 900 |
901 static inline EffectKey GenKey(const GrDrawEffect& drawEffect, const GrG
LCaps&) { | 901 static inline EffectKey GenKey(const GrDrawEffect& drawEffect, const GrG
LCaps&) { |
902 return 0x0; | 902 return 0x0; |
903 } | 903 } |
904 | 904 |
905 virtual void setData(const GrGLUniformManager&, const GrDrawEffect&) SK_
OVERRIDE {} | 905 virtual void setData(const GrGLContext&, const GrDrawEffect&) SK_OVERRID
E {} |
906 | 906 |
907 private: | 907 private: |
908 typedef GrGLEffect INHERITED; | 908 typedef GrGLEffect INHERITED; |
909 }; | 909 }; |
910 | 910 |
911 private: | 911 private: |
912 HairQuadEdgeEffect() { | 912 HairQuadEdgeEffect() { |
913 this->addVertexAttrib(kVec4f_GrSLType); | 913 this->addVertexAttrib(kVec4f_GrSLType); |
914 } | 914 } |
915 | 915 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
986 GrGLSLModulatef<4>(&modulate, inputColor, "edgeAlpha"); | 986 GrGLSLModulatef<4>(&modulate, inputColor, "edgeAlpha"); |
987 builder->fsCodeAppendf("\t%s = %s;\n", outputColor, modulate.c_str()
); | 987 builder->fsCodeAppendf("\t%s = %s;\n", outputColor, modulate.c_str()
); |
988 | 988 |
989 builder->vsCodeAppendf("\t%s = %s;\n", vsName, attrName->c_str()); | 989 builder->vsCodeAppendf("\t%s = %s;\n", vsName, attrName->c_str()); |
990 } | 990 } |
991 | 991 |
992 static inline EffectKey GenKey(const GrDrawEffect& drawEffect, const GrG
LCaps&) { | 992 static inline EffectKey GenKey(const GrDrawEffect& drawEffect, const GrG
LCaps&) { |
993 return 0x0; | 993 return 0x0; |
994 } | 994 } |
995 | 995 |
996 virtual void setData(const GrGLUniformManager&, const GrDrawEffect&) SK_
OVERRIDE {} | 996 virtual void setData(const GrGLContext&, const GrDrawEffect&) SK_OVERRID
E {} |
997 | 997 |
998 private: | 998 private: |
999 typedef GrGLEffect INHERITED; | 999 typedef GrGLEffect INHERITED; |
1000 }; | 1000 }; |
1001 | 1001 |
1002 private: | 1002 private: |
1003 HairLineEdgeEffect() { | 1003 HairLineEdgeEffect() { |
1004 this->addVertexAttrib(kVec4f_GrSLType); | 1004 this->addVertexAttrib(kVec4f_GrSLType); |
1005 this->setWillReadFragmentPosition(); | 1005 this->setWillReadFragmentPosition(); |
1006 } | 1006 } |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1238 kVertsPerQuad*n, // vCount | 1238 kVertsPerQuad*n, // vCount |
1239 kIdxsPerQuad*n, // iCount | 1239 kIdxsPerQuad*n, // iCount |
1240 &devBounds); | 1240 &devBounds); |
1241 conics += n; | 1241 conics += n; |
1242 } | 1242 } |
1243 } | 1243 } |
1244 target->resetIndexSource(); | 1244 target->resetIndexSource(); |
1245 | 1245 |
1246 return true; | 1246 return true; |
1247 } | 1247 } |
OLD | NEW |