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 2705293002: Chrome VR clang-format cleanup (Closed)
Patch Set: Rebase to ToT. Created 3 years, 10 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 <utility> 7 #include <utility>
8 8
9 #include "cc/layers/layer.h" 9 #include "cc/layers/layer.h"
10 #include "cc/layers/solid_color_layer.h" 10 #include "cc/layers/solid_color_layer.h"
11 #include "content/public/browser/android/compositor.h" 11 #include "content/public/browser/android/compositor.h"
12 #include "content/public/browser/web_contents.h" 12 #include "content/public/browser/web_contents.h"
13 #include "third_party/skia/include/core/SkColor.h" 13 #include "third_party/skia/include/core/SkColor.h"
14 #include "ui/android/window_android.h" 14 #include "ui/android/window_android.h"
15 15
16 namespace vr_shell { 16 namespace vr_shell {
17 17
18 VrCompositor::VrCompositor(ui::WindowAndroid* window, bool transparent) 18 VrCompositor::VrCompositor(ui::WindowAndroid* window, bool transparent)
19 : background_color_(SK_ColorWHITE), 19 : background_color_(SK_ColorWHITE), transparent_(transparent) {
20 transparent_(transparent) {
21 compositor_.reset(content::Compositor::Create(this, window)); 20 compositor_.reset(content::Compositor::Create(this, window));
22 compositor_->SetHasTransparentBackground(transparent); 21 compositor_->SetHasTransparentBackground(transparent);
23 } 22 }
24 23
25 VrCompositor::~VrCompositor() { 24 VrCompositor::~VrCompositor() {
26 RestoreLayer(); 25 RestoreLayer();
27 } 26 }
28 27
29 void VrCompositor::UpdateLayerTreeHost() {} 28 void VrCompositor::UpdateLayerTreeHost() {}
30 29
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 69
71 void VrCompositor::SetWindowBounds(gfx::Size size) { 70 void VrCompositor::SetWindowBounds(gfx::Size size) {
72 compositor_->SetWindowBounds(size); 71 compositor_->SetWindowBounds(size);
73 } 72 }
74 73
75 void VrCompositor::SurfaceChanged(jobject surface) { 74 void VrCompositor::SurfaceChanged(jobject surface) {
76 compositor_->SetSurface(surface); 75 compositor_->SetSurface(surface);
77 } 76 }
78 77
79 } // namespace vr_shell 78 } // namespace vr_shell
OLDNEW
« no previous file with comments | « chrome/browser/android/vr_shell/ui_scene_unittest.cc ('k') | chrome/browser/android/vr_shell/vr_gl_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698