[chromium] Move paintRenderedResultsToCanvas code into DrawingBuffer
Created attachment 137387 [details] Patch
Tested on the layout tests and by manually checking printing of san angeles and http://trac.webkit.org/export/114291/trunk/LayoutTests/fast/canvas/webgl/webgl-composite-modes.html. On http://trac.webkit.org/export/114291/trunk/LayoutTests/fast/canvas/webgl/webgl-composite-modes.html, after printing the 4 leftmost canvases (preservesDrawingBuffer==false) vanish. This happens with or without this patch.
Comment on attachment 137387 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=137387&action=review > Source/WebCore/platform/graphics/chromium/DrawingBufferChromium.cpp:173 > + if (!m_platformLayer || !m_platformLayer->drawsContent()) > + return; This code made more sense in WebGLLayerChromium. Would it make more sense just to check for context lost explicitly than go back to the platform layer, since that really doesn't have anything to do with this function anymore?
(In reply to comment #3) > (From update of attachment 137387 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=137387&action=review > > > Source/WebCore/platform/graphics/chromium/DrawingBufferChromium.cpp:173 > > + if (!m_platformLayer || !m_platformLayer->drawsContent()) > > + return; > > This code made more sense in WebGLLayerChromium. Would it make more sense just to check for context lost explicitly than go back to the platform layer, since that really doesn't have anything to do with this function anymore? This check in particular? This check is actually kind of silly - we never get here without having a layer (see WebGLRenderingContext::paintRenderingResultsToCanvas()) and I agree it'd be better to check explicitly for a lost context here.
Created attachment 137463 [details] tweak checks in DrawingBufferChromium
Created attachment 137465 [details] with more of teh compile
Comment on attachment 137465 [details] with more of teh compile R=me.
Comment on attachment 137465 [details] with more of teh compile Clearing flags on attachment: 137465 Committed r114344: <http://trac.webkit.org/changeset/114344>
All reviewed patches have been landed. Closing bug.