New issue
Advanced search Search tips

Issue 669371 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug

Blocking:
issue 600815



Sign in to add a comment

DisplayCompositor frame-size in high-dpi

Project Member Reported by sadrul@chromium.org, Nov 29 2016

Issue description

In 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
 

Comment 1 by sadrul@chromium.org, Nov 30 2016

Blocking: 600815
Blocking: 601863
Owner: riajiang@chromium.org
sgtm: Assigning to riajiang@.
Cc: kylec...@chromium.org
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().
Project Member

Comment 5 by bugdroid1@chromium.org, 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

Status: Fixed (was: Assigned)
Blocking: -601863
Components: -Internals>MUS Internals>Services>WindowService

Sign in to add a comment