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

Unified Diff: src/effects/gradients/SkTwoPointConicalGradient.cpp

Issue 2397473003: Harden degenerate gradient context handling (Closed)
Patch Set: Created 4 years, 2 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/effects/gradients/SkSweepGradient.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/gradients/SkTwoPointConicalGradient.cpp
diff --git a/src/effects/gradients/SkTwoPointConicalGradient.cpp b/src/effects/gradients/SkTwoPointConicalGradient.cpp
index fd48a6267938edc726956acb9ab6de93e02b4aa4..599fd4c9fdca91791fbf0d26ca7337f0c4412814 100644
--- a/src/effects/gradients/SkTwoPointConicalGradient.cpp
+++ b/src/effects/gradients/SkTwoPointConicalGradient.cpp
@@ -216,7 +216,7 @@ size_t SkTwoPointConicalGradient::onContextSize(const ContextRec&) const {
SkShader::Context* SkTwoPointConicalGradient::onCreateContext(const ContextRec& rec,
void* storage) const {
- return new (storage) TwoPointConicalGradientContext(*this, rec);
+ return CheckedCreateContext<TwoPointConicalGradientContext>(storage, *this, rec);
}
SkTwoPointConicalGradient::TwoPointConicalGradientContext::TwoPointConicalGradientContext(
« no previous file with comments | « src/effects/gradients/SkSweepGradient.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698