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

Unified Diff: src/effects/gradients/SkSweepGradient.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/SkRadialGradient.cpp ('k') | src/effects/gradients/SkTwoPointConicalGradient.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/gradients/SkSweepGradient.cpp
diff --git a/src/effects/gradients/SkSweepGradient.cpp b/src/effects/gradients/SkSweepGradient.cpp
index d99d979f6899d9f6812f8f141a3f1088b2352450..d1fe269b9cb228e29f0dc46aba1e619bec3a6415 100644
--- a/src/effects/gradients/SkSweepGradient.cpp
+++ b/src/effects/gradients/SkSweepGradient.cpp
@@ -50,7 +50,7 @@ size_t SkSweepGradient::onContextSize(const ContextRec&) const {
}
SkShader::Context* SkSweepGradient::onCreateContext(const ContextRec& rec, void* storage) const {
- return new (storage) SweepGradientContext(*this, rec);
+ return CheckedCreateContext<SweepGradientContext>(storage, *this, rec);
}
SkSweepGradient::SweepGradientContext::SweepGradientContext(
« no previous file with comments | « src/effects/gradients/SkRadialGradient.cpp ('k') | src/effects/gradients/SkTwoPointConicalGradient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698