| Index: services/ui/ws/window_server.cc
|
| diff --git a/services/ui/ws/window_server.cc b/services/ui/ws/window_server.cc
|
| index 794f258a32f92758fcf0eab22311cbb54257a581..d56e07b9b4d1d18731a3080c6ad2a1a3224d2061 100644
|
| --- a/services/ui/ws/window_server.cc
|
| +++ b/services/ui/ws/window_server.cc
|
| @@ -27,6 +27,7 @@
|
| #include "services/ui/ws/window_server_delegate.h"
|
| #include "services/ui/ws/window_tree.h"
|
| #include "services/ui/ws/window_tree_binding.h"
|
| +#include "ui/gfx/geometry/dip_util.h"
|
| #include "ui/gfx/geometry/size_conversions.h"
|
|
|
| namespace ui {
|
| @@ -751,7 +752,7 @@ void WindowServer::OnGpuServiceInitialized() {
|
| }
|
|
|
| void WindowServer::OnSurfaceCreated(const cc::SurfaceId& surface_id,
|
| - const gfx::Size& frame_size,
|
| + const gfx::Size& frame_size_in_dip,
|
| float device_scale_factor) {
|
| WindowId window_id(
|
| WindowIdFromTransportId(surface_id.frame_sink_id().client_id()));
|
| @@ -766,8 +767,10 @@ void WindowServer::OnSurfaceCreated(const cc::SurfaceId& surface_id,
|
| // Cache the last submitted surface ID in the window server.
|
| // DisplayCompositorFrameSink may submit a CompositorFrame without
|
| // creating a CompositorFrameSinkManager.
|
| + gfx::Size frame_size_in_pixels =
|
| + gfx::ConvertSizeToPixel(device_scale_factor, frame_size_in_dip);
|
| window->GetOrCreateCompositorFrameSinkManager()->SetLatestSurfaceInfo(
|
| - compositor_frame_sink_type, surface_id, frame_size);
|
| + compositor_frame_sink_type, surface_id, frame_size_in_pixels);
|
|
|
| // FrameGenerator will add an appropriate reference for the new surface.
|
| DCHECK(display_manager_->GetDisplayContaining(window));
|
| @@ -789,8 +792,8 @@ void WindowServer::OnSurfaceCreated(const cc::SurfaceId& surface_id,
|
| }
|
| WindowTree* window_tree = GetTreeWithId(window->parent()->id().client_id);
|
| if (window_tree) {
|
| - window_tree->ProcessWindowSurfaceChanged(window, surface_id, frame_size,
|
| - device_scale_factor);
|
| + window_tree->ProcessWindowSurfaceChanged(
|
| + window, surface_id, frame_size_in_pixels, device_scale_factor);
|
| }
|
| }
|
|
|
|
|