| Index: chrome/browser/android/vr_shell/vr_compositor.cc
|
| diff --git a/chrome/browser/android/vr_shell/vr_compositor.cc b/chrome/browser/android/vr_shell/vr_compositor.cc
|
| index 9ea4284054a6098552536c3d97f9ecde07293a93..673efc02757b840aad6c6a4176b1052346997c1f 100644
|
| --- a/chrome/browser/android/vr_shell/vr_compositor.cc
|
| +++ b/chrome/browser/android/vr_shell/vr_compositor.cc
|
| @@ -15,10 +15,8 @@
|
|
|
| namespace vr_shell {
|
|
|
| -VrCompositor::VrCompositor(ui::WindowAndroid* window, bool transparent)
|
| - : background_color_(SK_ColorWHITE), transparent_(transparent) {
|
| +VrCompositor::VrCompositor(ui::WindowAndroid* window) {
|
| compositor_.reset(content::Compositor::Create(this, window));
|
| - compositor_->SetHasTransparentBackground(transparent);
|
| }
|
|
|
| VrCompositor::~VrCompositor() {
|
| @@ -39,24 +37,15 @@ void VrCompositor::SetLayer(content::WebContents* web_contents) {
|
| // removing it from its previous parent, so we remember that and restore it to
|
| // its previous parent on teardown.
|
| layer_ = view_android->GetLayer();
|
| -
|
| - // Remember the old background color to be restored later.
|
| - background_color_ = layer_->background_color();
|
| - if (transparent_) {
|
| - layer_->SetBackgroundColor(SK_ColorTRANSPARENT);
|
| - }
|
| layer_parent_ = layer_->parent();
|
| compositor_->SetRootLayer(layer_);
|
| }
|
|
|
| void VrCompositor::RestoreLayer() {
|
| - if (!layer_)
|
| - return;
|
| - layer_->SetBackgroundColor(background_color_);
|
| - if (layer_parent_) {
|
| + if (layer_ && layer_parent_)
|
| layer_parent_->AddChild(layer_);
|
| - }
|
| layer_ = nullptr;
|
| + layer_parent_ = nullptr;
|
| }
|
|
|
| void VrCompositor::SurfaceDestroyed() {
|
|
|