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

Unified Diff: src/core/SkBitmapProcShader.cpp

Issue 1759653004: enforce 16byte alignment in shader contexts (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 months 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/SkBitmapProcShader.h ('k') | src/core/SkBlitter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBitmapProcShader.cpp
diff --git a/src/core/SkBitmapProcShader.cpp b/src/core/SkBitmapProcShader.cpp
index 895922c6b873a388210e0887d768f08dc05646c5..6c87ebeda463c279a7dfd75198934f37d52ef187 100644
--- a/src/core/SkBitmapProcShader.cpp
+++ b/src/core/SkBitmapProcShader.cpp
@@ -120,7 +120,7 @@ private:
size_t SkBitmapProcShader::ContextSize(const ContextRec& rec) {
// The SkBitmapProcState is stored outside of the context object, with the context holding
// a pointer to it.
- return sizeof(BitmapProcShaderContext) + sizeof(SkBitmapProcState);
+ return SkAlign16(sizeof(BitmapProcShaderContext) + sizeof(SkBitmapProcState));
}
SkShader::Context* SkBitmapProcShader::MakeContext(const SkShader& shader,
« no previous file with comments | « src/core/SkBitmapProcShader.h ('k') | src/core/SkBlitter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698