Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1585)

Unified Diff: services/ui/ws/window_server.cc

Issue 2610723002: Unify SurfaceInfo (Closed)
Patch Set: Cleanup offscreen canvas Created 3 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « services/ui/ws/window_server.h ('k') | services/ui/ws/window_tree.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/window_server.cc
diff --git a/services/ui/ws/window_server.cc b/services/ui/ws/window_server.cc
index 3f14290fab06bce2b11c0a4855096c31f3e408a8..651eb157e9b46ff77ddaf87b626ae6e22db48aba 100644
--- a/services/ui/ws/window_server.cc
+++ b/services/ui/ws/window_server.cc
@@ -765,14 +765,12 @@ void WindowServer::OnGpuServiceInitialized() {
delegate_->StartDisplayInit();
}
-void WindowServer::OnSurfaceCreated(const cc::SurfaceId& surface_id,
- const gfx::Size& frame_size,
- float device_scale_factor) {
+void WindowServer::OnSurfaceCreated(const cc::SurfaceInfo& surface_info) {
WindowId window_id(
- WindowIdFromTransportId(surface_id.frame_sink_id().client_id()));
+ WindowIdFromTransportId(surface_info.id().frame_sink_id().client_id()));
mojom::CompositorFrameSinkType compositor_frame_sink_type(
static_cast<mojom::CompositorFrameSinkType>(
- surface_id.frame_sink_id().sink_id()));
+ surface_info.id().frame_sink_id().sink_id()));
ServerWindow* window = GetWindow(window_id);
// If the window doesn't have a parent then we have nothing to propagate.
if (!window)
@@ -782,14 +780,14 @@ void WindowServer::OnSurfaceCreated(const cc::SurfaceId& surface_id,
// DisplayCompositorFrameSink may submit a CompositorFrame without
// creating a CompositorFrameSinkManager.
window->GetOrCreateCompositorFrameSinkManager()->SetLatestSurfaceInfo(
- compositor_frame_sink_type, surface_id, frame_size);
+ compositor_frame_sink_type, surface_info);
// FrameGenerator will add an appropriate reference for the new surface.
DCHECK(display_manager_->GetDisplayContaining(window));
display_manager_->GetDisplayContaining(window)
->platform_display()
->GetFrameGenerator()
- ->OnSurfaceCreated(surface_id, window);
+ ->OnSurfaceCreated(surface_info.id(), window);
// This is only used for testing to observe that a window has a
// CompositorFrame.
@@ -803,10 +801,8 @@ void WindowServer::OnSurfaceCreated(const cc::SurfaceId& surface_id,
return;
}
WindowTree* window_tree = GetTreeWithId(window->parent()->id().client_id);
- if (window_tree) {
- window_tree->ProcessWindowSurfaceChanged(window, surface_id, frame_size,
- device_scale_factor);
- }
+ if (window_tree)
+ window_tree->ProcessWindowSurfaceChanged(window, surface_info);
}
void WindowServer::OnDisplayCompositorCreated(
« no previous file with comments | « services/ui/ws/window_server.h ('k') | services/ui/ws/window_tree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698