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

Unified Diff: services/ui/surfaces/display_compositor.cc

Issue 2382873002: Replace usage of SurfaceId's client_id with FrameSinkId (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 | « content/test/test_render_view_host.cc ('k') | services/ui/ws/server_window_surface.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/surfaces/display_compositor.cc
diff --git a/services/ui/surfaces/display_compositor.cc b/services/ui/surfaces/display_compositor.cc
index e5b9d9e68f41008a3a77352fd08394b61ba60636..4603eacc0d549f2bb7da3ca64310a9519d663ecf 100644
--- a/services/ui/surfaces/display_compositor.cc
+++ b/services/ui/surfaces/display_compositor.cc
@@ -12,6 +12,7 @@
#include "cc/scheduler/delay_based_time_source.h"
#include "cc/surfaces/display.h"
#include "cc/surfaces/display_scheduler.h"
+#include "cc/surfaces/frame_sink_id.h"
#include "gpu/ipc/client/gpu_channel_host.h"
#include "services/ui/surfaces/direct_output_surface.h"
#include "services/ui/surfaces/surfaces_context_provider.h"
@@ -31,10 +32,10 @@ DisplayCompositor::DisplayCompositor(
: task_runner_(task_runner),
surfaces_state_(surfaces_state),
factory_(surfaces_state->manager(), this),
- allocator_(surfaces_state->next_client_id()) {
- surfaces_state_->manager()->RegisterSurfaceClientId(allocator_.client_id());
+ allocator_(cc::FrameSinkId(surfaces_state->next_client_id(), 0)) {
+ surfaces_state_->manager()->RegisterFrameSinkId(allocator_.frame_sink_id());
surfaces_state_->manager()->RegisterSurfaceFactoryClient(
- allocator_.client_id(), this);
+ allocator_.frame_sink_id(), this);
gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager =
gpu_channel->gpu_memory_buffer_manager();
@@ -75,14 +76,14 @@ DisplayCompositor::DisplayCompositor(
std::move(display_output_surface), std::move(scheduler),
base::MakeUnique<cc::TextureMailboxDeleter>(task_runner_.get())));
display_->Initialize(this, surfaces_state_->manager(),
- allocator_.client_id());
+ allocator_.frame_sink_id());
display_->SetVisible(true);
}
DisplayCompositor::~DisplayCompositor() {
surfaces_state_->manager()->UnregisterSurfaceFactoryClient(
- allocator_.client_id());
- surfaces_state_->manager()->InvalidateSurfaceClientId(allocator_.client_id());
+ allocator_.frame_sink_id());
+ surfaces_state_->manager()->InvalidateFrameSinkId(allocator_.frame_sink_id());
}
void DisplayCompositor::SubmitCompositorFrame(
« no previous file with comments | « content/test/test_render_view_host.cc ('k') | services/ui/ws/server_window_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698