Index: src/effects/gradients/SkLinearGradient.cpp |
diff --git a/src/effects/gradients/SkLinearGradient.cpp b/src/effects/gradients/SkLinearGradient.cpp |
index be29540add6abf78c9469af23e996b3f396f18d7..a249ae4ac82c2195ce2e559978cf057ce0a8377a 100644 |
--- a/src/effects/gradients/SkLinearGradient.cpp |
+++ b/src/effects/gradients/SkLinearGradient.cpp |
@@ -82,8 +82,8 @@ size_t SkLinearGradient::onContextSize(const ContextRec& rec) const { |
SkShader::Context* SkLinearGradient::onCreateContext(const ContextRec& rec, void* storage) const { |
return use_4f_context(rec, fGradFlags) |
- ? static_cast<SkShader::Context*>(new (storage) LinearGradient4fContext(*this, rec)) |
- : static_cast<SkShader::Context*>(new (storage) LinearGradientContext(*this, rec)); |
+ ? CheckedCreateContext<LinearGradient4fContext>(storage, *this, rec) |
+ : CheckedCreateContext< LinearGradientContext>(storage, *this, rec); |
} |
// This swizzles SkColor into the same component order as SkPMColor, but does not actually |