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

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

Issue 2429173005: Mus+Ash: Replace (Server)WindowSurface with (Server)WindowCompositorFrameSink (Closed)
Patch Set: ui::CompositorFrameSink => ui::WindowCompositorFrameSink 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
Index: services/ui/ws/window_tree.cc
diff --git a/services/ui/ws/window_tree.cc b/services/ui/ws/window_tree.cc
index c755e3b56e15b88936b8edceecda528368613892..a3e1210d85fbfa1c7a580da3a85e4a138b95f206 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"
@@ -769,10 +769,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);
}
@@ -1345,20 +1346,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,

Powered by Google App Engine
This is Rietveld 408576698