diff options
Diffstat (limited to 'src/jumper/SkJumper_stages.cpp')
-rw-r--r-- | src/jumper/SkJumper_stages.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/jumper/SkJumper_stages.cpp b/src/jumper/SkJumper_stages.cpp index 12cbdee2ed..d192728419 100644 --- a/src/jumper/SkJumper_stages.cpp +++ b/src/jumper/SkJumper_stages.cpp @@ -572,7 +572,8 @@ STAGE(premul_dst, Ctx::None) { db = db * da; } STAGE(unpremul, Ctx::None) { - auto scale = if_then_else(a == 0, 0, 1.0f / a); + float inf = bit_cast<float>(0x7f800000); + auto scale = if_then_else(1.0f/a < inf, 1.0f/a, 0); r *= scale; g *= scale; b *= scale; |