Index: services/ui/ws/window_server.h |
diff --git a/services/ui/ws/window_server.h b/services/ui/ws/window_server.h |
index 9eedec1760bb47fa529ca937154465b5e5e62c95..13258fda40fde7eb5635022abe0e6a48c12fcbf5 100644 |
--- a/services/ui/ws/window_server.h |
+++ b/services/ui/ws/window_server.h |
@@ -19,7 +19,8 @@ |
#include "services/ui/public/interfaces/window_manager_window_tree_factory.mojom.h" |
#include "services/ui/public/interfaces/window_tree.mojom.h" |
#include "services/ui/public/interfaces/window_tree_host.mojom.h" |
-#include "services/ui/surfaces/surfaces_state.h" |
+#include "services/ui/surfaces/display_compositor.h" |
+#include "services/ui/surfaces/display_compositor_client.h" |
#include "services/ui/ws/display.h" |
#include "services/ui/ws/gpu_service_proxy_delegate.h" |
#include "services/ui/ws/ids.h" |
@@ -48,6 +49,7 @@ class WindowTreeBinding; |
// WindowTrees) as well as providing the root of the hierarchy. |
class WindowServer : public ServerWindowDelegate, |
public ServerWindowObserver, |
+ public surfaces::DisplayCompositorClient, |
public GpuServiceProxyDelegate, |
public UserDisplayManagerDelegate, |
public UserIdTrackerObserver { |
@@ -176,6 +178,10 @@ class WindowServer : public ServerWindowDelegate, |
void ProcessWindowBoundsChanged(const ServerWindow* window, |
const gfx::Rect& old_bounds, |
const gfx::Rect& new_bounds); |
+ void ProcessWindowSurfaceCreated(ServerWindow* window, |
+ const gfx::Size& size, |
+ float device_scale_factor, |
+ const cc::SurfaceId& surface_id); |
void ProcessClientAreaChanged( |
const ServerWindow* window, |
const gfx::Insets& new_client_area, |
@@ -232,7 +238,7 @@ class WindowServer : public ServerWindowDelegate, |
WindowManagerState* GetWindowManagerStateForUser(const UserId& user_id); |
// ServerWindowDelegate: |
- ui::SurfacesState* GetSurfacesState() override; |
+ ui::surfaces::DisplayCompositor* GetDisplayCompositor() override; |
// UserDisplayManagerDelegate: |
bool GetFrameDecorationsForUser( |
@@ -257,6 +263,11 @@ class WindowServer : public ServerWindowDelegate, |
uint32_t client_change_id; |
}; |
+ // DisplayCompositorClient implementation: |
+ void OnSurfaceCreated(const gfx::Size& size, |
+ float device_scale_factor, |
+ const cc::SurfaceId& surface_id) override; |
+ |
using InFlightWindowManagerChangeMap = |
std::map<uint32_t, InFlightWindowManagerChange>; |
@@ -345,7 +356,7 @@ class WindowServer : public ServerWindowDelegate, |
WindowServerDelegate* delegate_; |
// State for rendering into a Surface. |
- scoped_refptr<ui::SurfacesState> surfaces_state_; |
+ scoped_refptr<ui::surfaces::DisplayCompositor> display_compositor_; |
// ID to use for next WindowTree. |
ClientSpecificId next_client_id_; |