Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(133)

Unified Diff: src/core/SkBitmapProcState_shaderproc.h

Issue 1530743002: Fix UB function problems for shaders and mask. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix 16-bit masks Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkBitmapProcState.cpp ('k') | src/core/SkBlitMask.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBitmapProcState_shaderproc.h
diff --git a/src/core/SkBitmapProcState_shaderproc.h b/src/core/SkBitmapProcState_shaderproc.h
index 94b2d3b48c26b3729ad40561bde95ba52b537e8d..b1fdc5f0562a373a399924e22f269c38a973d1cc 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);
« no previous file with comments | « src/core/SkBitmapProcState.cpp ('k') | src/core/SkBlitMask.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698