Propagate device scale factor to BrowserCompositorMac
With the new layout test flag --enable-display-compositor-pixel-dump, BrowserCompositorMac gets desired viewport size in device pixel from the renderer through BrowserCompositorMac::SynchronizeVisualProperties(), and convert that from device pixel to DIP and cache it. However BrowserCompositorMac doesn't know the overriden device scale factor by test scripts, thus the DIP viewport size will not be properly divided by the overriden device scale factor. When next time RenderWidgetHostImpl::SynchronizeVisualProperties is invoked, it will query the current viewport size, we would get the already scaled value and multiply it by the overriden device scale factor again. This makes the viewport size keeps growing until it exceeds the maximum texture size and crash. This CL makes BrowserCompositorMac to use the device scale factor from the render frame metadata, so the correct DIP size of the viewport can be derived. BUG=667551 Change-Id: I21f042ba8c158ce139d1ca6693d135b2fbb7b852 Reviewed-on: https://chromium-review.googlesource.com/1080031 Commit-Queue: ccameron <ccameron@chromium.org> Reviewed-by:ccameron <ccameron@chromium.org> Cr-Commit-Position: refs/heads/master@{#563056}
Showing
Please register or sign in to comment