| 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, ¶ms);
|
| - host_->SetVisible(host_should_be_visible_);
|
|
|
| DCHECK(!input_manager_);
|
| input_manager_ = BlimpInputManager::Create(
|
|
|