Index: src/effects/gradients/SkLinearGradient.cpp |
diff --git a/src/effects/gradients/SkLinearGradient.cpp b/src/effects/gradients/SkLinearGradient.cpp |
index cc8875cf8e83c69b939f7c268a07270b9a7d25c2..40503c96f18fbd219003da778e28c4a048d00587 100644 |
--- a/src/effects/gradients/SkLinearGradient.cpp |
+++ b/src/effects/gradients/SkLinearGradient.cpp |
@@ -88,10 +88,10 @@ void SkLinearGradient::flatten(SkWriteBuffer& buffer) const { |
buffer.writePoint(fEnd); |
} |
-size_t SkLinearGradient::contextSize(const ContextRec& rec) const { |
+size_t SkLinearGradient::onContextSize(const ContextRec& rec) const { |
return use_4f_context(rec, fGradFlags) |
- ? sizeof(LinearGradient4fContext) |
- : sizeof(LinearGradientContext); |
+ ? SkAlign16(sizeof(LinearGradient4fContext)) |
+ : SkAlign16(sizeof(LinearGradientContext)); |
} |
SkShader::Context* SkLinearGradient::onCreateContext(const ContextRec& rec, void* storage) const { |