DisplayCompositor frame-size in high-dpi |
|||||
Issue descriptionIn mus, WindowServer::OnSurfaceCreated() receives the |frame_size| in DIP space from the client [1, 2]. However, when FrameGenerator processes this information [3], it treats it as physical-pixel space. This needs to be fixed to make sure we do some conversion between DIP -> physical pixel space. From looking at the code, it appears as though [1] is working as intended (i.e. in chromium right now, I think cc::SurfaceObservers are notified of the frame-size in DIP [4]). [3] too I think is correct. The best place for doing the DIP -> physical pixel conversion would be in [2] I think, where the WindowServer receives the data from [1], before it sends it to [3]. Assigning to fsamuel@ for confirmation. If this sounds OK, then riajiang@ can own fixing this up. [1] https://cs.chromium.org/chromium/src/cc/trees/layer_tree_host_impl.cc?cl=GROK&gsn=CompositorFrame&rcl=1480378899&l=1506 [2] https://cs.chromium.org/chromium/src/services/ui/ws/window_server.cc?rcl=1480378899&l=766 [3] https://cs.chromium.org/chromium/src/services/ui/ws/frame_generator.cc?sq=package:chromium&dr=CSs&rcl=1480378899&l=222 [4] https://cs.chromium.org/chromium/src/services/ui/surfaces/display_compositor.cc?rcl=1480378899&l=150
,
Dec 1 2016
,
Dec 2 2016
,
Dec 5 2016
Reading over this closer I think a few things are backwards. WindowServer::OnSurfaceCreated() receives |frame_size| in PP (not DIP) from the GPU (not the client). That message is sent from DisplayCompositor::OnSurfaceCreated() which in term comes from SurfaceManager::SurfaceCreated().
,
Dec 17 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e5d57c4bddf4750a2889b2f391635f0dccbef431 commit e5d57c4bddf4750a2889b2f391635f0dccbef431 Author: riajiang <riajiang@chromium.org> Date: Sat Dec 17 04:42:05 2016 Set device scale factor in CompositorFrame and scale frame size in WS. 1. Set the correct device scale factor when creating CompositorFrame in FrameGenerator and MusBrowserCompositorOutputSurface. 2. Scale the frame size by device scale factor from DIP to physical pixels in WindowServer. This also solves the first TODO of CL https://codereview.chromium.org/2447303002/. BUG= 669371 TEST=manual (with --force-device-scale-factor=2) CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel Review-Url: https://codereview.chromium.org/2547243002 Cr-Commit-Position: refs/heads/master@{#439321} [modify] https://crrev.com/e5d57c4bddf4750a2889b2f391635f0dccbef431/content/browser/compositor/mus_browser_compositor_output_surface.cc [modify] https://crrev.com/e5d57c4bddf4750a2889b2f391635f0dccbef431/services/ui/surfaces/display_compositor.cc [modify] https://crrev.com/e5d57c4bddf4750a2889b2f391635f0dccbef431/services/ui/ws/frame_generator.cc [modify] https://crrev.com/e5d57c4bddf4750a2889b2f391635f0dccbef431/services/ui/ws/frame_generator.h [modify] https://crrev.com/e5d57c4bddf4750a2889b2f391635f0dccbef431/services/ui/ws/frame_generator_unittest.cc [modify] https://crrev.com/e5d57c4bddf4750a2889b2f391635f0dccbef431/services/ui/ws/platform_display_default.cc [modify] https://crrev.com/e5d57c4bddf4750a2889b2f391635f0dccbef431/services/ui/ws/window_tree_client_unittest.cc [modify] https://crrev.com/e5d57c4bddf4750a2889b2f391635f0dccbef431/ui/display/screen_base.cc
,
Dec 20 2016
,
Jun 13 2017
,
Feb 26 2018
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by sadrul@chromium.org
, Nov 30 2016