aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkBitmapProcState_shaderproc.h
diff options
context:
space:
mode:
authorGravatar herb <herb@google.com>2015-12-18 09:52:15 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-12-18 09:52:15 -0800
commitc7a784cc8cb1c1dfcd39a32b2170ffe547904e9f (patch)
treea4ae39c648dc78dd2562730828e2996d2b03de99 /src/core/SkBitmapProcState_shaderproc.h
parent3e6be16e6d4dda6a27f0e1dbfe7c87fecfbf5577 (diff)
Fix UB function problems for shaders and mask.
Diffstat (limited to 'src/core/SkBitmapProcState_shaderproc.h')
-rw-r--r--src/core/SkBitmapProcState_shaderproc.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/SkBitmapProcState_shaderproc.h b/src/core/SkBitmapProcState_shaderproc.h
index 94b2d3b48c..b1fdc5f056 100644
--- a/src/core/SkBitmapProcState_shaderproc.h
+++ b/src/core/SkBitmapProcState_shaderproc.h
@@ -12,11 +12,12 @@
// Can't be static in the general case because some of these implementations
// will be defined and referenced in different object files.
-void SCALE_FILTER_NAME(const SkBitmapProcState& s, int x, int y,
+void SCALE_FILTER_NAME(const void* sIn, int x, int y,
DSTTYPE* SK_RESTRICT colors, int count);
-void SCALE_FILTER_NAME(const SkBitmapProcState& s, int x, int y,
+void SCALE_FILTER_NAME(const void* sIn, int x, int y,
DSTTYPE* SK_RESTRICT colors, int count) {
+ const SkBitmapProcState& s = *static_cast<const SkBitmapProcState*>(sIn);
SkASSERT((s.fInvType & ~(SkMatrix::kTranslate_Mask |
SkMatrix::kScale_Mask)) == 0);
SkASSERT(s.fInvKy == 0);