diff options
author | herb <herb@google.com> | 2015-12-17 14:22:34 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-17 14:22:34 -0800 |
commit | dafd044e4aea529f88d899247678d4549f776388 (patch) | |
tree | feb5f2c96bc1f0f4e3ac3e70e45e515a36f7fdfd /src/core/SkBlitter_ARGB32.cpp | |
parent | 5b30c6f6224f5e9d29ff7060311556ba0eee0fdc (diff) |
Fix UB function problems for shaders and mask.
BUG=skia:4634
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1530743002
Review URL: https://codereview.chromium.org/1530743002
Diffstat (limited to 'src/core/SkBlitter_ARGB32.cpp')
-rw-r--r-- | src/core/SkBlitter_ARGB32.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/SkBlitter_ARGB32.cpp b/src/core/SkBlitter_ARGB32.cpp index e44ad02da5..a00ed86d8e 100644 --- a/src/core/SkBlitter_ARGB32.cpp +++ b/src/core/SkBlitter_ARGB32.cpp @@ -570,7 +570,7 @@ void SkARGB32_Shader_Blitter::blitMask(const SkMask& mask, const SkIRect& clip) SkXfermode* xfer = fXfermode; do { shaderContext->shadeSpan(x, y, span, width); - xfer->xfer32((SkPMColor*)dstRow, span, width, maskRow); + xfer->xfer32(reinterpret_cast<SkPMColor*>(dstRow), span, width, maskRow); dstRow += dstRB; maskRow += maskRB; y += 1; @@ -578,7 +578,7 @@ void SkARGB32_Shader_Blitter::blitMask(const SkMask& mask, const SkIRect& clip) } else { do { shaderContext->shadeSpan(x, y, span, width); - proc(dstRow, maskRow, span, width); + proc(reinterpret_cast<SkPMColor*>(dstRow), maskRow, span, width); dstRow += dstRB; maskRow += maskRB; y += 1; |