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

Side by Side Diff: chrome/browser/android/vr_shell/vr_compositor.cc

Issue 2595263002: Introduce ViewRoot forwarding input/view events to native (Closed)
Patch Set: tests Created 3 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/android/vr_shell/vr_compositor.h" 5 #include "chrome/browser/android/vr_shell/vr_compositor.h"
6 6
7 #include "cc/layers/layer.h" 7 #include "cc/layers/layer.h"
8 #include "content/public/browser/android/compositor.h" 8 #include "content/public/browser/android/compositor.h"
9 #include "content/public/browser/web_contents.h" 9 #include "content/public/browser/web_contents.h"
10 #include "third_party/skia/include/core/SkColor.h" 10 #include "third_party/skia/include/core/SkColor.h"
11 #include "ui/android/view_android.h"
11 #include "ui/android/window_android.h" 12 #include "ui/android/window_android.h"
12 13
13 namespace vr_shell { 14 namespace vr_shell {
14 15
15 VrCompositor::VrCompositor(ui::WindowAndroid* window, bool transparent) 16 VrCompositor::VrCompositor(ui::WindowAndroid* window, bool transparent)
16 : background_color_(SK_ColorWHITE), 17 : background_color_(SK_ColorWHITE),
17 transparent_(transparent) { 18 transparent_(transparent) {
18 compositor_.reset(content::Compositor::Create(this, window)); 19 compositor_.reset(content::Compositor::Create(this, window));
19 compositor_->SetHasTransparentBackground(transparent); 20 compositor_->SetHasTransparentBackground(transparent);
20 } 21 }
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 bounds_ = size; 59 bounds_ = size;
59 compositor_->SetWindowBounds(bounds_); 60 compositor_->SetWindowBounds(bounds_);
60 } 61 }
61 62
62 void VrCompositor::SurfaceChanged(jobject surface) { 63 void VrCompositor::SurfaceChanged(jobject surface) {
63 DCHECK(surface); 64 DCHECK(surface);
64 compositor_->SetSurface(surface); 65 compositor_->SetSurface(surface);
65 } 66 }
66 67
67 } // namespace vr_shell 68 } // namespace vr_shell
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698