| 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 ad52fd233a44e5e1bb677cfdc420060b95378bcd..6681e8d340d0ec573e1fd6d55f210358e5bffabd 100644
|
| --- a/chrome/browser/android/vr_shell/vr_compositor.cc
|
| +++ b/chrome/browser/android/vr_shell/vr_compositor.cc
|
| @@ -10,6 +10,8 @@
|
| #include "third_party/skia/include/core/SkColor.h"
|
| #include "ui/android/window_android.h"
|
|
|
| +using base::android::JavaParamRef;
|
| +
|
| namespace vr_shell {
|
|
|
| VrCompositor::VrCompositor(ui::WindowAndroid* window, bool transparent)
|
| @@ -35,6 +37,7 @@ void VrCompositor::OnSwapBuffersCompleted(int pending_swap_buffers) {}
|
| void VrCompositor::SetLayer(content::WebContents* web_contents) {
|
| assert(layer_ == nullptr);
|
| ui::ViewAndroid* view_android = web_contents->GetNativeView();
|
| +
|
| // When we pass the layer for the ContentViewCore to the compositor it may be
|
| // removing it from its previous parent, so we remember that and restore it to
|
| // its previous parent on teardown.
|
| @@ -53,13 +56,13 @@ void VrCompositor::SurfaceDestroyed() {
|
| compositor_->SetSurface(nullptr);
|
| }
|
|
|
| -void VrCompositor::SurfaceChanged(
|
| - int width,
|
| - int height,
|
| - const base::android::JavaParamRef<jobject>& surface) {
|
| +void VrCompositor::SetWindowBounds(int width, int height) {
|
| + compositor_->SetWindowBounds(gfx::Size(width, height));
|
| +}
|
| +
|
| +void VrCompositor::SurfaceChanged(const JavaParamRef<jobject>& surface) {
|
| DCHECK(surface);
|
| compositor_->SetSurface(surface);
|
| - compositor_->SetWindowBounds(gfx::Size(width, height));
|
| }
|
|
|
| } // namespace vr_shell
|
|
|