OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
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 "SkXfermode.h" | 9 #include "SkXfermode.h" |
10 #include "SkXfermode_opts_SSE2.h" | 10 #include "SkXfermode_opts_SSE2.h" |
(...skipping 1002 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1013 #endif | 1013 #endif |
1014 | 1014 |
1015 /////////////////////////////////////////////////////////////////////////////// | 1015 /////////////////////////////////////////////////////////////////////////////// |
1016 | 1016 |
1017 class SkClearXfermode : public SkProcCoeffXfermode { | 1017 class SkClearXfermode : public SkProcCoeffXfermode { |
1018 public: | 1018 public: |
1019 static SkClearXfermode* Create(const ProcCoeff& rec) { | 1019 static SkClearXfermode* Create(const ProcCoeff& rec) { |
1020 return SkNEW_ARGS(SkClearXfermode, (rec)); | 1020 return SkNEW_ARGS(SkClearXfermode, (rec)); |
1021 } | 1021 } |
1022 | 1022 |
1023 void xfer32(SkPMColor*, const SkPMColor*, int, const SkAlpha*) const SK_OVER
RIDE; | 1023 void xfer32(SkPMColor*, const SkPMColor*, int, const SkAlpha*) const overrid
e; |
1024 void xferA8(SkAlpha*, const SkPMColor*, int, const SkAlpha*) const SK_OVERRI
DE; | 1024 void xferA8(SkAlpha*, const SkPMColor*, int, const SkAlpha*) const override; |
1025 | 1025 |
1026 SK_TO_STRING_OVERRIDE() | 1026 SK_TO_STRING_OVERRIDE() |
1027 | 1027 |
1028 private: | 1028 private: |
1029 SkClearXfermode(const ProcCoeff& rec) : SkProcCoeffXfermode(rec, kClear_Mode
) {} | 1029 SkClearXfermode(const ProcCoeff& rec) : SkProcCoeffXfermode(rec, kClear_Mode
) {} |
1030 | 1030 |
1031 typedef SkProcCoeffXfermode INHERITED; | 1031 typedef SkProcCoeffXfermode INHERITED; |
1032 }; | 1032 }; |
1033 | 1033 |
1034 void SkClearXfermode::xfer32(SkPMColor* SK_RESTRICT dst, | 1034 void SkClearXfermode::xfer32(SkPMColor* SK_RESTRICT dst, |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1075 #endif | 1075 #endif |
1076 | 1076 |
1077 /////////////////////////////////////////////////////////////////////////////// | 1077 /////////////////////////////////////////////////////////////////////////////// |
1078 | 1078 |
1079 class SkSrcXfermode : public SkProcCoeffXfermode { | 1079 class SkSrcXfermode : public SkProcCoeffXfermode { |
1080 public: | 1080 public: |
1081 static SkSrcXfermode* Create(const ProcCoeff& rec) { | 1081 static SkSrcXfermode* Create(const ProcCoeff& rec) { |
1082 return SkNEW_ARGS(SkSrcXfermode, (rec)); | 1082 return SkNEW_ARGS(SkSrcXfermode, (rec)); |
1083 } | 1083 } |
1084 | 1084 |
1085 void xfer32(SkPMColor*, const SkPMColor*, int, const SkAlpha*) const SK_OVER
RIDE; | 1085 void xfer32(SkPMColor*, const SkPMColor*, int, const SkAlpha*) const overrid
e; |
1086 void xferA8(SkAlpha*, const SkPMColor*, int, const SkAlpha*) const SK_OVERRI
DE; | 1086 void xferA8(SkAlpha*, const SkPMColor*, int, const SkAlpha*) const override; |
1087 | 1087 |
1088 SK_TO_STRING_OVERRIDE() | 1088 SK_TO_STRING_OVERRIDE() |
1089 | 1089 |
1090 private: | 1090 private: |
1091 SkSrcXfermode(const ProcCoeff& rec) : SkProcCoeffXfermode(rec, kSrc_Mode) {} | 1091 SkSrcXfermode(const ProcCoeff& rec) : SkProcCoeffXfermode(rec, kSrc_Mode) {} |
1092 typedef SkProcCoeffXfermode INHERITED; | 1092 typedef SkProcCoeffXfermode INHERITED; |
1093 }; | 1093 }; |
1094 | 1094 |
1095 void SkSrcXfermode::xfer32(SkPMColor* SK_RESTRICT dst, | 1095 void SkSrcXfermode::xfer32(SkPMColor* SK_RESTRICT dst, |
1096 const SkPMColor* SK_RESTRICT src, int count, | 1096 const SkPMColor* SK_RESTRICT src, int count, |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1141 #endif | 1141 #endif |
1142 | 1142 |
1143 /////////////////////////////////////////////////////////////////////////////// | 1143 /////////////////////////////////////////////////////////////////////////////// |
1144 | 1144 |
1145 class SkDstInXfermode : public SkProcCoeffXfermode { | 1145 class SkDstInXfermode : public SkProcCoeffXfermode { |
1146 public: | 1146 public: |
1147 static SkDstInXfermode* Create(const ProcCoeff& rec) { | 1147 static SkDstInXfermode* Create(const ProcCoeff& rec) { |
1148 return SkNEW_ARGS(SkDstInXfermode, (rec)); | 1148 return SkNEW_ARGS(SkDstInXfermode, (rec)); |
1149 } | 1149 } |
1150 | 1150 |
1151 void xfer32(SkPMColor*, const SkPMColor*, int, const SkAlpha*) const SK_OVER
RIDE; | 1151 void xfer32(SkPMColor*, const SkPMColor*, int, const SkAlpha*) const overrid
e; |
1152 | 1152 |
1153 SK_TO_STRING_OVERRIDE() | 1153 SK_TO_STRING_OVERRIDE() |
1154 | 1154 |
1155 private: | 1155 private: |
1156 SkDstInXfermode(const ProcCoeff& rec) : SkProcCoeffXfermode(rec, kDstIn_Mode
) {} | 1156 SkDstInXfermode(const ProcCoeff& rec) : SkProcCoeffXfermode(rec, kDstIn_Mode
) {} |
1157 | 1157 |
1158 typedef SkProcCoeffXfermode INHERITED; | 1158 typedef SkProcCoeffXfermode INHERITED; |
1159 }; | 1159 }; |
1160 | 1160 |
1161 void SkDstInXfermode::xfer32(SkPMColor* SK_RESTRICT dst, | 1161 void SkDstInXfermode::xfer32(SkPMColor* SK_RESTRICT dst, |
(...skipping 23 matching lines...) Expand all Loading... |
1185 #endif | 1185 #endif |
1186 | 1186 |
1187 /////////////////////////////////////////////////////////////////////////////// | 1187 /////////////////////////////////////////////////////////////////////////////// |
1188 | 1188 |
1189 class SkDstOutXfermode : public SkProcCoeffXfermode { | 1189 class SkDstOutXfermode : public SkProcCoeffXfermode { |
1190 public: | 1190 public: |
1191 static SkDstOutXfermode* Create(const ProcCoeff& rec) { | 1191 static SkDstOutXfermode* Create(const ProcCoeff& rec) { |
1192 return SkNEW_ARGS(SkDstOutXfermode, (rec)); | 1192 return SkNEW_ARGS(SkDstOutXfermode, (rec)); |
1193 } | 1193 } |
1194 | 1194 |
1195 void xfer32(SkPMColor*, const SkPMColor*, int, const SkAlpha*) const SK_OVER
RIDE; | 1195 void xfer32(SkPMColor*, const SkPMColor*, int, const SkAlpha*) const overrid
e; |
1196 | 1196 |
1197 SK_TO_STRING_OVERRIDE() | 1197 SK_TO_STRING_OVERRIDE() |
1198 | 1198 |
1199 private: | 1199 private: |
1200 SkDstOutXfermode(const ProcCoeff& rec) : SkProcCoeffXfermode(rec, kDstOut_Mo
de) {} | 1200 SkDstOutXfermode(const ProcCoeff& rec) : SkProcCoeffXfermode(rec, kDstOut_Mo
de) {} |
1201 | 1201 |
1202 typedef SkProcCoeffXfermode INHERITED; | 1202 typedef SkProcCoeffXfermode INHERITED; |
1203 }; | 1203 }; |
1204 | 1204 |
1205 void SkDstOutXfermode::xfer32(SkPMColor* SK_RESTRICT dst, | 1205 void SkDstOutXfermode::xfer32(SkPMColor* SK_RESTRICT dst, |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1536 } else { | 1536 } else { |
1537 proc16 = rec.fProc16_General; | 1537 proc16 = rec.fProc16_General; |
1538 } | 1538 } |
1539 } | 1539 } |
1540 return proc16; | 1540 return proc16; |
1541 } | 1541 } |
1542 | 1542 |
1543 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkXfermode) | 1543 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkXfermode) |
1544 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkProcCoeffXfermode) | 1544 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkProcCoeffXfermode) |
1545 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END | 1545 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END |
OLD | NEW |