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

Side by Side Diff: src/gpu/effects/GrDashingEffect.cpp

Issue 1443743002: Rename some processor functions from GL to GLSL (Closed) Base URL: https://skia.googlesource.com/skia.git@primProcs
Patch Set: nits Created 5 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 | « src/gpu/effects/GrCustomXfermode.cpp ('k') | src/gpu/effects/GrDisableColorXP.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 * Copyright 2014 Google Inc. 2 * Copyright 2014 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 "GrDashingEffect.h" 8 #include "GrDashingEffect.h"
9 9
10 #include "GrBatchFlushState.h" 10 #include "GrBatchFlushState.h"
(...skipping 772 matching lines...) Expand 10 before | Expand all | Expand 10 after
783 DashAAMode aaMode() const { return fAAMode; } 783 DashAAMode aaMode() const { return fAAMode; }
784 784
785 GrColor color() const { return fColor; } 785 GrColor color() const { return fColor; }
786 786
787 bool colorIgnored() const { return GrColor_ILLEGAL == fColor; } 787 bool colorIgnored() const { return GrColor_ILLEGAL == fColor; }
788 788
789 const SkMatrix& localMatrix() const { return fLocalMatrix; } 789 const SkMatrix& localMatrix() const { return fLocalMatrix; }
790 790
791 bool usesLocalCoords() const { return fUsesLocalCoords; } 791 bool usesLocalCoords() const { return fUsesLocalCoords; }
792 792
793 void getGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder* b) const ov erride; 793 void getGLSLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder* b) const override;
794 794
795 GrGLSLPrimitiveProcessor* createGLInstance(const GrGLSLCaps&) const override ; 795 GrGLSLPrimitiveProcessor* createGLSLInstance(const GrGLSLCaps&) const overri de;
796 796
797 private: 797 private:
798 DashingCircleEffect(GrColor, DashAAMode aaMode, const SkMatrix& localMatrix, 798 DashingCircleEffect(GrColor, DashAAMode aaMode, const SkMatrix& localMatrix,
799 bool usesLocalCoords); 799 bool usesLocalCoords);
800 800
801 GrColor fColor; 801 GrColor fColor;
802 SkMatrix fLocalMatrix; 802 SkMatrix fLocalMatrix;
803 bool fUsesLocalCoords; 803 bool fUsesLocalCoords;
804 DashAAMode fAAMode; 804 DashAAMode fAAMode;
805 const Attribute* fInPosition; 805 const Attribute* fInPosition;
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
922 922
923 ////////////////////////////////////////////////////////////////////////////// 923 //////////////////////////////////////////////////////////////////////////////
924 924
925 GrGeometryProcessor* DashingCircleEffect::Create(GrColor color, 925 GrGeometryProcessor* DashingCircleEffect::Create(GrColor color,
926 DashAAMode aaMode, 926 DashAAMode aaMode,
927 const SkMatrix& localMatrix, 927 const SkMatrix& localMatrix,
928 bool usesLocalCoords) { 928 bool usesLocalCoords) {
929 return new DashingCircleEffect(color, aaMode, localMatrix, usesLocalCoords); 929 return new DashingCircleEffect(color, aaMode, localMatrix, usesLocalCoords);
930 } 930 }
931 931
932 void DashingCircleEffect::getGLProcessorKey(const GrGLSLCaps& caps,GrProcessorKe yBuilder* b) const { 932 void DashingCircleEffect::getGLSLProcessorKey(const GrGLSLCaps& caps,
933 GrProcessorKeyBuilder* b) const {
933 GLDashingCircleEffect::GenKey(*this, caps, b); 934 GLDashingCircleEffect::GenKey(*this, caps, b);
934 } 935 }
935 936
936 GrGLSLPrimitiveProcessor* DashingCircleEffect::createGLInstance(const GrGLSLCaps &) const { 937 GrGLSLPrimitiveProcessor* DashingCircleEffect::createGLSLInstance(const GrGLSLCa ps&) const {
937 return new GLDashingCircleEffect(); 938 return new GLDashingCircleEffect();
938 } 939 }
939 940
940 DashingCircleEffect::DashingCircleEffect(GrColor color, 941 DashingCircleEffect::DashingCircleEffect(GrColor color,
941 DashAAMode aaMode, 942 DashAAMode aaMode,
942 const SkMatrix& localMatrix, 943 const SkMatrix& localMatrix,
943 bool usesLocalCoords) 944 bool usesLocalCoords)
944 : fColor(color) 945 : fColor(color)
945 , fLocalMatrix(localMatrix) 946 , fLocalMatrix(localMatrix)
946 , fUsesLocalCoords(usesLocalCoords) 947 , fUsesLocalCoords(usesLocalCoords)
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
994 DashAAMode aaMode() const { return fAAMode; } 995 DashAAMode aaMode() const { return fAAMode; }
995 996
996 GrColor color() const { return fColor; } 997 GrColor color() const { return fColor; }
997 998
998 bool colorIgnored() const { return GrColor_ILLEGAL == fColor; } 999 bool colorIgnored() const { return GrColor_ILLEGAL == fColor; }
999 1000
1000 const SkMatrix& localMatrix() const { return fLocalMatrix; } 1001 const SkMatrix& localMatrix() const { return fLocalMatrix; }
1001 1002
1002 bool usesLocalCoords() const { return fUsesLocalCoords; } 1003 bool usesLocalCoords() const { return fUsesLocalCoords; }
1003 1004
1004 void getGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) con st override; 1005 void getGLSLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) c onst override;
1005 1006
1006 GrGLSLPrimitiveProcessor* createGLInstance(const GrGLSLCaps&) const override ; 1007 GrGLSLPrimitiveProcessor* createGLSLInstance(const GrGLSLCaps&) const overri de;
1007 1008
1008 private: 1009 private:
1009 DashingLineEffect(GrColor, DashAAMode aaMode, const SkMatrix& localMatrix, 1010 DashingLineEffect(GrColor, DashAAMode aaMode, const SkMatrix& localMatrix,
1010 bool usesLocalCoords); 1011 bool usesLocalCoords);
1011 1012
1012 GrColor fColor; 1013 GrColor fColor;
1013 SkMatrix fLocalMatrix; 1014 SkMatrix fLocalMatrix;
1014 bool fUsesLocalCoords; 1015 bool fUsesLocalCoords;
1015 DashAAMode fAAMode; 1016 DashAAMode fAAMode;
1016 const Attribute* fInPosition; 1017 const Attribute* fInPosition;
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
1146 1147
1147 ////////////////////////////////////////////////////////////////////////////// 1148 //////////////////////////////////////////////////////////////////////////////
1148 1149
1149 GrGeometryProcessor* DashingLineEffect::Create(GrColor color, 1150 GrGeometryProcessor* DashingLineEffect::Create(GrColor color,
1150 DashAAMode aaMode, 1151 DashAAMode aaMode,
1151 const SkMatrix& localMatrix, 1152 const SkMatrix& localMatrix,
1152 bool usesLocalCoords) { 1153 bool usesLocalCoords) {
1153 return new DashingLineEffect(color, aaMode, localMatrix, usesLocalCoords); 1154 return new DashingLineEffect(color, aaMode, localMatrix, usesLocalCoords);
1154 } 1155 }
1155 1156
1156 void DashingLineEffect::getGLProcessorKey(const GrGLSLCaps& caps, 1157 void DashingLineEffect::getGLSLProcessorKey(const GrGLSLCaps& caps,
1157 GrProcessorKeyBuilder* b) const { 1158 GrProcessorKeyBuilder* b) const {
1158 GLDashingLineEffect::GenKey(*this, caps, b); 1159 GLDashingLineEffect::GenKey(*this, caps, b);
1159 } 1160 }
1160 1161
1161 GrGLSLPrimitiveProcessor* DashingLineEffect::createGLInstance(const GrGLSLCaps&) const { 1162 GrGLSLPrimitiveProcessor* DashingLineEffect::createGLSLInstance(const GrGLSLCaps &) const {
1162 return new GLDashingLineEffect(); 1163 return new GLDashingLineEffect();
1163 } 1164 }
1164 1165
1165 DashingLineEffect::DashingLineEffect(GrColor color, 1166 DashingLineEffect::DashingLineEffect(GrColor color,
1166 DashAAMode aaMode, 1167 DashAAMode aaMode,
1167 const SkMatrix& localMatrix, 1168 const SkMatrix& localMatrix,
1168 bool usesLocalCoords) 1169 bool usesLocalCoords)
1169 : fColor(color) 1170 : fColor(color)
1170 , fLocalMatrix(localMatrix) 1171 , fLocalMatrix(localMatrix)
1171 , fUsesLocalCoords(usesLocalCoords) 1172 , fUsesLocalCoords(usesLocalCoords)
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
1280 info.fIntervals = intervals; 1281 info.fIntervals = intervals;
1281 info.fCount = 2; 1282 info.fCount = 2;
1282 info.fPhase = phase; 1283 info.fPhase = phase;
1283 SkDEBUGCODE(bool success = ) strokeInfo.setDashInfo(info); 1284 SkDEBUGCODE(bool success = ) strokeInfo.setDashInfo(info);
1284 SkASSERT(success); 1285 SkASSERT(success);
1285 1286
1286 return create_batch(color, viewMatrix, pts, useAA, strokeInfo, msaaRT); 1287 return create_batch(color, viewMatrix, pts, useAA, strokeInfo, msaaRT);
1287 } 1288 }
1288 1289
1289 #endif 1290 #endif
OLDNEW
« no previous file with comments | « src/gpu/effects/GrCustomXfermode.cpp ('k') | src/gpu/effects/GrDisableColorXP.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698