| Index: ui/compositor/compositor.cc
|
| diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc
|
| index 416fcf15012ac1d3aa93d6905b3f10117bc9f20b..0c33cfd49f13637e4bef9b9547f6350d9e0c5d7a 100644
|
| --- a/ui/compositor/compositor.cc
|
| +++ b/ui/compositor/compositor.cc
|
| @@ -379,6 +379,9 @@ void Compositor::SetBackgroundColor(SkColor color) {
|
|
|
| void Compositor::SetVisible(bool visible) {
|
| host_->SetVisible(visible);
|
| + // Compositor is not registered with context_factory_ until
|
| + // first CreateOutputSurface call, so this may not do anything.
|
| + context_factory_->SetDisplayVisible(this, visible);
|
| }
|
|
|
| bool Compositor::IsVisible() {
|
| @@ -399,8 +402,12 @@ void Compositor::SetAcceleratedWidget(gfx::AcceleratedWidget widget) {
|
| DCHECK(!widget_valid_);
|
| widget_ = widget;
|
| widget_valid_ = true;
|
| - if (output_surface_requested_)
|
| + if (output_surface_requested_) {
|
| context_factory_->CreateOutputSurface(weak_ptr_factory_.GetWeakPtr());
|
| + // Compositor is not registered with context_factory_ until
|
| + // first CreateOutputSurface call.
|
| + context_factory_->SetDisplayVisible(this, host_->visible());
|
| + }
|
| }
|
|
|
| gfx::AcceleratedWidget Compositor::ReleaseAcceleratedWidget() {
|
| @@ -493,8 +500,12 @@ void Compositor::UpdateLayerTreeHost() {
|
| void Compositor::RequestNewOutputSurface() {
|
| DCHECK(!output_surface_requested_);
|
| output_surface_requested_ = true;
|
| - if (widget_valid_)
|
| + if (widget_valid_) {
|
| context_factory_->CreateOutputSurface(weak_ptr_factory_.GetWeakPtr());
|
| + // Compositor is not registered with context_factory_ until
|
| + // first CreateOutputSurface call.
|
| + context_factory_->SetDisplayVisible(this, host_->visible());
|
| + }
|
| }
|
|
|
| void Compositor::DidInitializeOutputSurface() {
|
|
|