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

Unified Diff: blimp/client/core/compositor/blimp_compositor.cc

Issue 2320823003: cc/blimp: Remove Initialize and Close messages. (Closed)
Patch Set: format 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
Index: blimp/client/core/compositor/blimp_compositor.cc
diff --git a/blimp/client/core/compositor/blimp_compositor.cc b/blimp/client/core/compositor/blimp_compositor.cc
index 068f7f916d2185c77fe929d18d974a2a82453191..d6031c83fba11ff639dabbdf869755185c651888 100644
--- a/blimp/client/core/compositor/blimp_compositor.cc
+++ b/blimp/client/core/compositor/blimp_compositor.cc
@@ -63,7 +63,6 @@ BlimpCompositor::BlimpCompositor(
: render_widget_id_(render_widget_id),
client_(client),
compositor_dependencies_(compositor_dependencies),
- host_should_be_visible_(false),
output_surface_(nullptr),
output_surface_request_pending_(false),
layer_(cc::Layer::Create()),
@@ -75,22 +74,19 @@ BlimpCompositor::BlimpCompositor(
GetEmbedderDeps()->AllocateSurfaceClientId());
GetEmbedderDeps()->GetSurfaceManager()->RegisterSurfaceClientId(
surface_id_allocator_->client_id());
+ CreateLayerTreeHost();
}
BlimpCompositor::~BlimpCompositor() {
DCHECK(thread_checker_.CalledOnValidThread());
- if (host_)
- DestroyLayerTreeHost();
-
+ DestroyLayerTreeHost();
GetEmbedderDeps()->GetSurfaceManager()->InvalidateSurfaceClientId(
surface_id_allocator_->client_id());
}
void BlimpCompositor::SetVisible(bool visible) {
- host_should_be_visible_ = visible;
- if (host_)
- host_->SetVisible(host_should_be_visible_);
+ host_->SetVisible(visible);
}
bool BlimpCompositor::OnTouchEvent(const ui::MotionEvent& motion_event) {
@@ -136,18 +132,6 @@ void BlimpCompositor::OnCompositorMessageReceived(
case cc::proto::CompositorMessageToImpl::UNKNOWN:
NOTIMPLEMENTED() << "Ignoring message of UNKNOWN type";
break;
- case cc::proto::CompositorMessageToImpl::INITIALIZE_IMPL:
- DCHECK(!host_);
-
- // Create the remote client LayerTreeHost for the compositor.
- CreateLayerTreeHost();
- break;
- case cc::proto::CompositorMessageToImpl::CLOSE_IMPL:
- DCHECK(host_);
-
- // Destroy the remote client LayerTreeHost for the compositor.
- DestroyLayerTreeHost();
- break;
default:
// We should have a receiver if we're getting compositor messages that
// are not INITIALIZE_IMPL or CLOSE_IMPL.
@@ -293,7 +277,6 @@ void BlimpCompositor::CreateLayerTreeHost() {
host_ = cc::LayerTreeHost::CreateRemoteClient(
this /* remote_proto_channel */, compositor_task_runner, &params);
- host_->SetVisible(host_should_be_visible_);
DCHECK(!input_manager_);
input_manager_ = BlimpInputManager::Create(
« no previous file with comments | « blimp/client/core/compositor/blimp_compositor.h ('k') | blimp/client/core/compositor/blimp_compositor_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698