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

Unified Diff: content/renderer/android/synchronous_compositor_frame_sink.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/common/view_messages.h ('k') | content/renderer/gpu/render_widget_compositor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/android/synchronous_compositor_frame_sink.cc
diff --git a/content/renderer/android/synchronous_compositor_frame_sink.cc b/content/renderer/android/synchronous_compositor_frame_sink.cc
index 3ba0cf799f49e73070c197c8a1c2952feb08871a..ce28e99c3c3d32ab0ac8f8c12fd199501dd0e56f 100644
--- a/content/renderer/android/synchronous_compositor_frame_sink.cc
+++ b/content/renderer/android/synchronous_compositor_frame_sink.cc
@@ -45,7 +45,7 @@ namespace content {
namespace {
const int64_t kFallbackTickTimeoutInMilliseconds = 100;
-const uint32_t kCompositorClientId = 1;
+const cc::FrameSinkId kCompositorFrameSinkId(1, 1);
// Do not limit number of resources, so use an unrealistically high value.
const size_t kNumResourcesLimit = 10 * 1000 * 1000;
@@ -120,7 +120,7 @@ SynchronousCompositorFrameSink::SynchronousCompositorFrameSink(
memory_policy_(0u),
frame_swap_message_queue_(frame_swap_message_queue),
surface_manager_(new cc::SurfaceManager),
- surface_id_allocator_(new cc::SurfaceIdAllocator(kCompositorClientId)),
+ surface_id_allocator_(new cc::SurfaceIdAllocator(kCompositorFrameSinkId)),
surface_factory_(new cc::SurfaceFactory(surface_manager_.get(), this)),
begin_frame_source_(std::move(begin_frame_source)) {
DCHECK(registry_);
@@ -167,9 +167,9 @@ bool SynchronousCompositorFrameSink::BindToClient(
registry_->RegisterCompositorFrameSink(routing_id_, this);
registered_ = true;
- 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);
cc::RendererSettings software_renderer_settings;
@@ -188,7 +188,7 @@ bool SynchronousCompositorFrameSink::BindToClient(
nullptr /* begin_frame_source */, std::move(compositor_frame_sink),
nullptr /* scheduler */, nullptr /* texture_mailbox_deleter */));
display_->Initialize(&display_client_, surface_manager_.get(),
- surface_id_allocator_->client_id());
+ surface_id_allocator_->frame_sink_id());
display_->SetVisible(true);
return true;
}
@@ -204,9 +204,9 @@ void SynchronousCompositorFrameSink::DetachFromClient() {
if (!delegated_surface_id_.is_null())
surface_factory_->Destroy(delegated_surface_id_);
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());
software_compositor_frame_sink_ = nullptr;
display_ = nullptr;
surface_factory_ = nullptr;
« no previous file with comments | « content/common/view_messages.h ('k') | content/renderer/gpu/render_widget_compositor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698