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

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

Issue 2319863005: Implement new compositor and ContentViewCore reparenting for VR Shell. (Closed)
Patch Set: Rebase onto ToT Created 4 years, 3 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_COMPOSITOR_H_
6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_COMPOSITOR_H_
7
8 #include <memory>
9
10 #include "base/android/scoped_java_ref.h"
11 #include "base/macros.h"
12 #include "content/public/browser/android/compositor_client.h"
13
14 namespace cc {
15 class Layer;
16 }
17
18 namespace content {
19 class Compositor;
20 class ContentViewCore;
21 }
22
23 namespace ui {
24 class WindowAndroid;
25 }
26
27 namespace vr_shell {
28
29 class VrCompositor : public content::CompositorClient {
30 public:
31 explicit VrCompositor(ui::WindowAndroid* window);
32 ~VrCompositor() override;
33
34 void SurfaceDestroyed();
35 void SurfaceChanged(int width,
36 int height,
37 const base::android::JavaParamRef<jobject>& surface);
38 void SetLayer(content::ContentViewCore* core);
39
40 // CompositorClient implementation:
41 void UpdateLayerTreeHost() override;
42 void OnSwapBuffersCompleted(int pending_swap_buffers) override;
43
44 private:
45 std::unique_ptr<content::Compositor> compositor_;
46
47 cc::Layer* layer_ = nullptr;
48 cc::Layer* layer_parent_ = nullptr;
49
50 DISALLOW_COPY_AND_ASSIGN(VrCompositor);
51 };
52
53 } // namespace vr_shell
54
55 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_COMPOSITOR_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/vr_shell/BUILD.gn ('k') | chrome/browser/android/vr_shell/vr_compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698