diff options
Diffstat (limited to 'src/effects/gradients/SkLinearGradient.cpp')
-rw-r--r-- | src/effects/gradients/SkLinearGradient.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/effects/gradients/SkLinearGradient.cpp b/src/effects/gradients/SkLinearGradient.cpp index cc8875cf8e..40503c96f1 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 { |