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

Unified Diff: third_party/WebKit/Source/platform/graphics/filters/FETurbulence.cpp

Issue 1375793003: Update error-handling for fe*Lighting and feTurbulence (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 | « third_party/WebKit/Source/platform/graphics/filters/FELighting.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/graphics/filters/FETurbulence.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/filters/FETurbulence.cpp b/third_party/WebKit/Source/platform/graphics/filters/FETurbulence.cpp
index 64644165294bd4fb894f1838683e6ef208f590e1..1781eb0b2094a57e2716fa7d3f855977d8a66fe4 100644
--- a/third_party/WebKit/Source/platform/graphics/filters/FETurbulence.cpp
+++ b/third_party/WebKit/Source/platform/graphics/filters/FETurbulence.cpp
@@ -149,6 +149,9 @@ SkShader* FETurbulence::createShader()
PassRefPtr<SkImageFilter> FETurbulence::createImageFilter(SkiaImageFilterBuilder* builder)
{
+ if (m_baseFrequencyX < 0 || m_baseFrequencyY < 0)
+ return createTransparentBlack(builder);
+
SkAutoTUnref<SkShader> shader(createShader());
SkImageFilter::CropRect rect = getCropRect(builder->cropOffset());
return adoptRef(SkRectShaderImageFilter::Create(shader, &rect));
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/filters/FELighting.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698