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

Unified Diff: content/browser/renderer_host/compositor_impl_android.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
Index: content/browser/renderer_host/compositor_impl_android.cc
diff --git a/content/browser/renderer_host/compositor_impl_android.cc b/content/browser/renderer_host/compositor_impl_android.cc
index 0a24f5dbb4694ffb6059ea216c0f10c0703acbb5..477a1a303077f4388cfb494cb11c8c89cf996acf 100644
--- a/content/browser/renderer_host/compositor_impl_android.cc
+++ b/content/browser/renderer_host/compositor_impl_android.cc
@@ -398,9 +398,8 @@ bool CompositorImpl::IsInitialized() {
CompositorImpl::CompositorImpl(CompositorClient* client,
gfx::NativeWindow root_window)
- : surface_id_allocator_(
- new cc::SurfaceIdAllocator(ui::ContextProviderFactory::GetInstance()
- ->AllocateSurfaceClientId())),
+ : surface_id_allocator_(new cc::SurfaceIdAllocator(
+ ui::ContextProviderFactory::GetInstance()->AllocateFrameSinkId())),
resource_manager_(root_window),
has_transparent_background_(false),
device_scale_factor_(1),
@@ -416,7 +415,7 @@ CompositorImpl::CompositorImpl(CompositorClient* client,
weak_factory_(this) {
ui::ContextProviderFactory::GetInstance()
->GetSurfaceManager()
- ->RegisterSurfaceClientId(surface_id_allocator_->client_id());
+ ->RegisterFrameSinkId(surface_id_allocator_->frame_sink_id());
DCHECK(client);
DCHECK(root_window);
DCHECK(root_window->GetLayer() == nullptr);
@@ -436,7 +435,7 @@ CompositorImpl::~CompositorImpl() {
SetSurface(NULL);
ui::ContextProviderFactory::GetInstance()
->GetSurfaceManager()
- ->InvalidateSurfaceClientId(surface_id_allocator_->client_id());
+ ->InvalidateFrameSinkId(surface_id_allocator_->frame_sink_id());
}
ui::UIResourceProvider& CompositorImpl::GetUIResourceProvider() {
@@ -521,7 +520,7 @@ void CompositorImpl::CreateLayerTreeHost() {
host_ = cc::LayerTreeHostInProcess::CreateSingleThreaded(this, &params);
DCHECK(!host_->IsVisible());
host_->GetLayerTree()->SetRootLayer(root_window_->GetLayer());
- host_->SetSurfaceClientId(surface_id_allocator_->client_id());
+ host_->SetFrameSinkId(surface_id_allocator_->frame_sink_id());
host_->GetLayerTree()->SetViewportSize(size_);
host_->GetLayerTree()->set_has_transparent_background(
has_transparent_background_);
@@ -826,8 +825,8 @@ void CompositorImpl::SetNeedsAnimate() {
host_->SetNeedsAnimate();
}
-uint32_t CompositorImpl::GetSurfaceClientId() {
- return surface_id_allocator_->client_id();
+cc::FrameSinkId CompositorImpl::GetFrameSinkId() {
+ return surface_id_allocator_->frame_sink_id();
}
bool CompositorImpl::HavePendingReadbacks() {

Powered by Google App Engine
This is Rietveld 408576698