Not disable acceleration in getImage if its Desynchronized
This is a temporary fix for this issue, that will totally be fixed after we land the new 2d canvas api (that will completely remove the path of code causing this regression in base_rendering_context_2d.cc: if (!RuntimeEnabledFeatures::NewCanvas2DAPIEnabled()) { // GetImagedata is faster in Unaccelerated canvases // Do not disaccelerate if Desync2d Canvas on android. // Issue 1112060: putImageData() does not work for desynchronized 2D canvas // on Android if (IsAccelerated()) { DisableAcceleration(); base::UmaHistogramEnumeration("Blink.Canvas.GPUFallbackToCPU", GPUFallbackToCPUScenario::kGetImageData); } } This CL specifically disables that path if the canvas is Desynchronized. To do so this CL adds some infrastructural elements to be able to access to the desynchronization setting inside getImage. This issue is only happening in a very specific corner case, which proves hard to be tested. This code will be deleted once we enable the new canvas api - so this is a temporary fix. Bug: 1112060 Change-Id: I60b90f716332b3969c82dfef3431e4cbd66e6500 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2541063Reviewed-by:Aaron Krajeski <aaronhk@chromium.org> Commit-Queue: Juanmi Huertas <juanmihd@chromium.org> Cr-Commit-Position: refs/heads/master@{#829679}
Showing
Please register or sign in to comment