After Issue 902585 , WebGL lowLatency has one frame copy, namely from the DrawingBuffer to the CanvasResourceProvider's Texture [1,2]. Investigate removing this copy altogether, and just make WebGL's DrawingBuffer (|back_color_buffer_|, |front_color_buffer_|, any of |recycled_color_buffer_queue_| ) be the front buffer of the Display Compositor. [1] https://cs.chromium.org/chromium/src/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc?type=cs&q=CopyRenderingResultsFromDrawingBuffer&sq=package:chromium&g=0&l=1580 [2] https://cs.chromium.org/chromium/src/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc?type=cs&q=CopyRenderingResultsFromDrawingBuffer&sq=package:chromium&g=0&l=1602 [3] https://cs.chromium.org/chromium/src/third_party/blink/renderer/platform/graphics/gpu/drawing_buffer.h?type=cs&q=drawing_buffer+back_color_buffer_+front_color_buffer_&g=0&l=530
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/91eb6618fd6df939ee84a234fcdeb49bf375eff4 commit 91eb6618fd6df939ee84a234fcdeb49bf375eff4 Author: Miguel Casas <mcasas@chromium.org> Date: Fri Jan 18 21:30:43 2019 Canvas 2D: handle null ContextGL and restyle kbr@ pointed crrev.com/c/1404705 that DCHECK() ContextGL() is not good because the context can be null at any time. This CL handles properly those null ContextGL. And it takes the chance to remove {} in the vicinity, where superfluous, and refactor for early return ISO deep indents. Bug: 920626 Change-Id: Ib6fa2655c40f8bf623b6d51dc425e8bc20aa31b5 Reviewed-on: https://chromium-review.googlesource.com/c/1422958 Reviewed-by: Emircan Uysaler <emircan@chromium.org> Commit-Queue: Miguel Casas <mcasas@chromium.org> Cr-Commit-Position: refs/heads/master@{#624292} [modify] https://crrev.com/91eb6618fd6df939ee84a234fcdeb49bf375eff4/third_party/blink/renderer/platform/graphics/canvas_2d_layer_bridge.cc [modify] https://crrev.com/91eb6618fd6df939ee84a234fcdeb49bf375eff4/third_party/blink/renderer/platform/graphics/canvas_resource.cc
Comment 1 by mcasas@chromium.org
, Jan 10