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

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

Issue 2658643003: Refactor GvrDelegate ownership into GvrDelegateProvider and fix more threading violations. (Closed)
Patch Set: Address comments 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 "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"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 if (layer_parent_) { 52 if (layer_parent_) {
53 layer_parent_->AddChild(layer_); 53 layer_parent_->AddChild(layer_);
54 } 54 }
55 } 55 }
56 56
57 void VrCompositor::SurfaceDestroyed() { 57 void VrCompositor::SurfaceDestroyed() {
58 compositor_->SetSurface(nullptr); 58 compositor_->SetSurface(nullptr);
59 } 59 }
60 60
61 void VrCompositor::SetWindowBounds(gfx::Size size) { 61 void VrCompositor::SetWindowBounds(gfx::Size size) {
62 bounds_ = size; 62 compositor_->SetWindowBounds(size);
63 compositor_->SetWindowBounds(bounds_);
64 } 63 }
65 64
66 void VrCompositor::SurfaceChanged(jobject surface) { 65 void VrCompositor::SurfaceChanged(jobject surface) {
67 DCHECK(surface); 66 DCHECK(surface);
68 compositor_->SetSurface(surface); 67 compositor_->SetSurface(surface);
69 } 68 }
70 69
71 } // namespace vr_shell 70 } // namespace vr_shell
OLDNEW
« no previous file with comments | « chrome/browser/android/vr_shell/vr_compositor.h ('k') | chrome/browser/android/vr_shell/vr_gl_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698