OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 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 "SkPM4fPriv.h" | 8 #include "SkPM4fPriv.h" |
9 #include "SkUtils.h" | 9 #include "SkUtils.h" |
10 #include "SkXfermode.h" | 10 #include "SkXfermode.h" |
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 r4 = lerp(r4, d4, lcd16_to_unit_4f(rgb)); | 457 r4 = lerp(r4, d4, lcd16_to_unit_4f(rgb)); |
458 dst[i] = store_dst<D>(r4) | (SK_A32_MASK << SK_A32_SHIFT); | 458 dst[i] = store_dst<D>(r4) | (SK_A32_MASK << SK_A32_SHIFT); |
459 } | 459 } |
460 } | 460 } |
461 | 461 |
462 SkXfermode::LCD32Proc SkXfermode::GetLCD32Proc(uint32_t flags) { | 462 SkXfermode::LCD32Proc SkXfermode::GetLCD32Proc(uint32_t flags) { |
463 SkASSERT((flags & ~7) == 0); | 463 SkASSERT((flags & ~7) == 0); |
464 flags &= 7; | 464 flags &= 7; |
465 | 465 |
466 const LCD32Proc procs[] = { | 466 const LCD32Proc procs[] = { |
| 467 srcover_n_lcd<kLinear_Dst>, src_n_lcd<kLinear_Dst>, |
| 468 srcover_1_lcd<kLinear_Dst>, src_1_lcd<kLinear_Dst>, |
| 469 |
467 srcover_n_lcd<kSRGB_Dst>, src_n_lcd<kSRGB_Dst>, | 470 srcover_n_lcd<kSRGB_Dst>, src_n_lcd<kSRGB_Dst>, |
468 srcover_1_lcd<kSRGB_Dst>, src_1_lcd<kSRGB_Dst>, | 471 srcover_1_lcd<kSRGB_Dst>, src_1_lcd<kSRGB_Dst>, |
469 | |
470 srcover_n_lcd<kLinear_Dst>, src_n_lcd<kLinear_Dst>, | |
471 srcover_1_lcd<kLinear_Dst>, src_1_lcd<kLinear_Dst>, | |
472 }; | 472 }; |
473 return procs[flags]; | 473 return procs[flags]; |
474 } | 474 } |
OLD | NEW |