Change GraphicsContext image-drawing functions to take references
Created attachment 263038 [details] Patch
Comment on attachment 263038 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=263038&action=review > Source/WebCore/platform/graphics/filters/FEBlend.cpp:76 > + if (!imageBuffer || !imageBuffer2) > + return; Please make sure this doesn't cause us to end up with uninitialized data in a filter buffer. > Source/WebCore/platform/graphics/filters/FEColorMatrix.cpp:151 > + if (inBuffer) As above. I really think crashing might be better in some of these cases. > Source/WebCore/platform/graphics/filters/FEMerge.cpp:54 > + if (ImageBuffer* inBuffer = in->asImageBuffer()) Ditto. > Source/WebCore/platform/graphics/filters/FEOffset.cpp:83 > + if (!resultImage || !inBuffer) Ditto. > Source/WebCore/platform/graphics/filters/FETile.cpp:51 > + if (!resultImage || !inBuffer) Ditto. > Source/WebCore/platform/graphics/filters/SourceAlpha.cpp:57 > + if (!imageBuffer) Ditto. > Source/WebCore/platform/graphics/filters/SourceGraphic.cpp:56 > + if (!resultImage || !sourceImage) Ditto maybe? > Source/WebCore/rendering/FilterEffectRenderer.cpp:432 > + if (ImageBuffer* outputBuffer = filter->output()) { I'm going to stop dittoing now.
I simulated failure in some of the FE* cases and got blank, not garbage pixels.
Created attachment 263046 [details] Patch
Comment on attachment 263046 [details] Patch EWS is still not happy.
Created attachment 263050 [details] Patch
Created attachment 263051 [details] Patch
Created attachment 263053 [details] Patch
Created attachment 263078 [details] Patch
https://trac.webkit.org/r191049