OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 #ifndef Sk4pxXfermode_DEFINED | 8 #ifndef Sk4pxXfermode_DEFINED |
9 #define Sk4pxXfermode_DEFINED | 9 #define Sk4pxXfermode_DEFINED |
10 | 10 |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 ProcF fProcF; | 273 ProcF fProcF; |
274 typedef SkProcCoeffXfermode INHERITED; | 274 typedef SkProcCoeffXfermode INHERITED; |
275 }; | 275 }; |
276 | 276 |
277 } // namespace | 277 } // namespace |
278 | 278 |
279 namespace SK_OPTS_NS { | 279 namespace SK_OPTS_NS { |
280 | 280 |
281 static SkXfermode* create_xfermode(const ProcCoeff& rec, SkXfermode::Mode mode)
{ | 281 static SkXfermode* create_xfermode(const ProcCoeff& rec, SkXfermode::Mode mode)
{ |
282 switch (mode) { | 282 switch (mode) { |
283 #define CASE(Mode) case SkXfermode::k##Mode##_Mode: \ | 283 #define CASE(Mode) \ |
284 return SkNEW_ARGS(Sk4pxXfermode, (rec, mode, &Mode, &xfer_aa<Mode>)) | 284 case SkXfermode::k##Mode##_Mode: \ |
| 285 return new Sk4pxXfermode(rec, mode, &Mode, &xfer_aa<Mode>) |
285 CASE(Clear); | 286 CASE(Clear); |
286 CASE(Src); | 287 CASE(Src); |
287 CASE(Dst); | 288 CASE(Dst); |
288 CASE(SrcOver); | 289 CASE(SrcOver); |
289 CASE(DstOver); | 290 CASE(DstOver); |
290 CASE(SrcIn); | 291 CASE(SrcIn); |
291 CASE(DstIn); | 292 CASE(DstIn); |
292 CASE(SrcOut); | 293 CASE(SrcOut); |
293 CASE(DstOut); | 294 CASE(DstOut); |
294 CASE(SrcATop); | 295 CASE(SrcATop); |
295 CASE(DstATop); | 296 CASE(DstATop); |
296 CASE(Xor); | 297 CASE(Xor); |
297 CASE(Plus); | 298 CASE(Plus); |
298 CASE(Modulate); | 299 CASE(Modulate); |
299 CASE(Screen); | 300 CASE(Screen); |
300 CASE(Multiply); | 301 CASE(Multiply); |
301 CASE(Difference); | 302 CASE(Difference); |
302 CASE(Exclusion); | 303 CASE(Exclusion); |
303 CASE(HardLight); | 304 CASE(HardLight); |
304 CASE(Overlay); | 305 CASE(Overlay); |
305 CASE(Darken); | 306 CASE(Darken); |
306 CASE(Lighten); | 307 CASE(Lighten); |
307 #undef CASE | 308 #undef CASE |
308 | 309 |
309 #define CASE(Mode) case SkXfermode::k##Mode##_Mode: \ | 310 #define CASE(Mode) \ |
310 return SkNEW_ARGS(SkPMFloatXfermode, (rec, mode, &Mode)) | 311 case SkXfermode::k##Mode##_Mode: \ |
| 312 return new SkPMFloatXfermode(rec, mode, &Mode) |
311 CASE(ColorDodge); | 313 CASE(ColorDodge); |
312 CASE(ColorBurn); | 314 CASE(ColorBurn); |
313 CASE(SoftLight); | 315 CASE(SoftLight); |
314 #undef CASE | 316 #undef CASE |
315 | 317 |
316 default: break; | 318 default: break; |
317 } | 319 } |
318 return nullptr; | 320 return nullptr; |
319 } | 321 } |
320 | 322 |
321 } // namespace SK_OPTS_NS | 323 } // namespace SK_OPTS_NS |
322 | 324 |
323 #endif//Sk4pxXfermode_DEFINED | 325 #endif//Sk4pxXfermode_DEFINED |
OLD | NEW |