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

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

Issue 2429173005: Mus+Ash: Replace (Server)WindowSurface with (Server)WindowCompositorFrameSink (Closed)
Patch Set: Rebased Created 4 years, 2 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_tree.h ('k') | services/ui/ws/window_tree_client_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/window_tree.cc
diff --git a/services/ui/ws/window_tree.cc b/services/ui/ws/window_tree.cc
index fe08e2670e1c4f796779e3178996ea33e58321b4..15c5f52920feff306ffcbbb6efac0347783bf185 100644
--- a/services/ui/ws/window_tree.cc
+++ b/services/ui/ws/window_tree.cc
@@ -19,8 +19,8 @@
#include "services/ui/ws/operation.h"
#include "services/ui/ws/platform_display.h"
#include "services/ui/ws/server_window.h"
+#include "services/ui/ws/server_window_compositor_frame_sink_manager.h"
#include "services/ui/ws/server_window_observer.h"
-#include "services/ui/ws/server_window_surface_manager.h"
#include "services/ui/ws/user_display_manager.h"
#include "services/ui/ws/window_manager_display_root.h"
#include "services/ui/ws/window_manager_state.h"
@@ -773,10 +773,11 @@ void WindowTree::ProcessWindowSurfaceChanged(ServerWindow* window,
return;
}
- ServerWindowSurfaceManager* surface_manager =
- window->GetOrCreateSurfaceManager();
- ServerWindowSurface* surface = surface_manager->GetDefaultSurface();
- cc::SurfaceSequence sequence = surface->CreateSurfaceSequence();
+ ServerWindowCompositorFrameSinkManager* compositor_frame_sink_manager =
+ window->GetOrCreateCompositorFrameSinkManager();
+ ServerWindowCompositorFrameSink* compositor_frame_sink =
+ compositor_frame_sink_manager->GetDefaultCompositorFrameSink();
+ cc::SurfaceSequence sequence = compositor_frame_sink->CreateSurfaceSequence();
client()->OnWindowSurfaceChanged(client_window_id.id, surface_id, sequence,
frame_size, device_scale_factor);
}
@@ -1349,20 +1350,21 @@ void WindowTree::SetWindowOpacity(uint32_t change_id,
change_id, SetWindowOpacity(ClientWindowId(window_id), opacity));
}
-void WindowTree::AttachSurface(
+void WindowTree::AttachCompositorFrameSink(
Id transport_window_id,
- mojom::SurfaceType type,
+ mojom::CompositorFrameSinkType type,
mojo::InterfaceRequest<cc::mojom::MojoCompositorFrameSink> surface,
cc::mojom::MojoCompositorFrameSinkClientPtr client) {
ServerWindow* window =
GetWindowByClientId(ClientWindowId(transport_window_id));
const bool success =
- window && access_policy_->CanSetWindowSurface(window, type);
+ window && access_policy_->CanSetWindowCompositorFrameSink(window, type);
if (!success) {
- DVLOG(1) << "request to AttachSurface failed";
+ DVLOG(1) << "request to AttachCompositorFrameSink failed";
return;
}
- window->CreateSurface(type, std::move(surface), std::move(client));
+ window->CreateCompositorFrameSink(type, std::move(surface),
+ std::move(client));
}
void WindowTree::OnWindowSurfaceDetached(Id transport_window_id,
« no previous file with comments | « services/ui/ws/window_tree.h ('k') | services/ui/ws/window_tree_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698