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

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

Issue 2369793002: WIP: Propagate SurfaceID up window tree hierarchy
Patch Set: Fix input events: EventDispatcher ignores container windows Created 4 years, 3 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/server_window_surface.h ('k') | services/ui/ws/server_window_surface_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/server_window_surface.cc
diff --git a/services/ui/ws/server_window_surface.cc b/services/ui/ws/server_window_surface.cc
index b05b0fcd2dadc63ae6f9baa53bb0ef7548532981..7034747b4e622a2403d4f2c42c34fcff8213ba8e 100644
--- a/services/ui/ws/server_window_surface.cc
+++ b/services/ui/ws/server_window_surface.cc
@@ -9,7 +9,7 @@
#include "cc/output/compositor_frame.h"
#include "cc/quads/shared_quad_state.h"
#include "cc/quads/surface_draw_quad.h"
-#include "services/ui/surfaces/surfaces_state.h"
+#include "services/ui/surfaces/display_compositor.h"
#include "services/ui/ws/server_window.h"
#include "services/ui/ws/server_window_delegate.h"
#include "services/ui/ws/server_window_surface_manager.h"
@@ -19,18 +19,20 @@ namespace ws {
ServerWindowSurface::ServerWindowSurface(
ServerWindowSurfaceManager* manager,
+ const cc::FrameSinkId& frame_sink_id,
mojo::InterfaceRequest<Surface> request,
mojom::SurfaceClientPtr client)
: manager_(manager),
- surface_id_allocator_(
- manager->window()->delegate()->GetSurfacesState()->next_client_id()),
+ surface_id_allocator_(frame_sink_id),
surface_factory_(manager_->GetSurfaceManager(), this),
client_(std::move(client)),
binding_(this, std::move(request)) {
+ fprintf(stderr, ">>>>%s frame_sink_id: %s\n", __PRETTY_FUNCTION__,
+ frame_sink_id.ToString().c_str());
cc::SurfaceManager* surface_manager = manager_->GetSurfaceManager();
- surface_manager->RegisterSurfaceClientId(surface_id_allocator_.client_id());
+ surface_manager->RegisterFrameSinkId(surface_id_allocator_.frame_sink_id());
surface_manager->RegisterSurfaceFactoryClient(
- surface_id_allocator_.client_id(), this);
+ surface_id_allocator_.frame_sink_id(), this);
}
ServerWindowSurface::~ServerWindowSurface() {
@@ -40,8 +42,8 @@ ServerWindowSurface::~ServerWindowSurface() {
surface_factory_.DestroyAll();
cc::SurfaceManager* surface_manager = manager_->GetSurfaceManager();
surface_manager->UnregisterSurfaceFactoryClient(
- surface_id_allocator_.client_id());
- surface_manager->InvalidateSurfaceClientId(surface_id_allocator_.client_id());
+ surface_id_allocator_.frame_sink_id());
+ surface_manager->InvalidateFrameSinkId(surface_id_allocator_.frame_sink_id());
}
void ServerWindowSurface::SubmitCompositorFrame(
« no previous file with comments | « services/ui/ws/server_window_surface.h ('k') | services/ui/ws/server_window_surface_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698