OLD | NEW |
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 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_COMPOSITOR_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_COMPOSITOR_H_ |
6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_COMPOSITOR_H_ | 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_COMPOSITOR_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/android/scoped_java_ref.h" | 10 #include "base/android/scoped_java_ref.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 class VrCompositor : public content::CompositorClient { | 32 class VrCompositor : public content::CompositorClient { |
33 public: | 33 public: |
34 VrCompositor(ui::WindowAndroid* window, bool is_transparent); | 34 VrCompositor(ui::WindowAndroid* window, bool is_transparent); |
35 ~VrCompositor() override; | 35 ~VrCompositor() override; |
36 | 36 |
37 void SurfaceDestroyed(); | 37 void SurfaceDestroyed(); |
38 void SetWindowBounds(gfx::Size size); | 38 void SetWindowBounds(gfx::Size size); |
39 void SurfaceChanged(jobject surface); | 39 void SurfaceChanged(jobject surface); |
40 void SetLayer(content::WebContents* web_contents); | 40 void SetLayer(content::WebContents* web_contents); |
41 | 41 |
42 // CompositorClient implementation: | |
43 void UpdateLayerTreeHost() override; | |
44 void OnSwapBuffersCompleted(int pending_swap_buffers) override; | |
45 | |
46 private: | 42 private: |
47 void RestoreLayer(); | 43 void RestoreLayer(); |
48 | 44 |
49 std::unique_ptr<content::Compositor> compositor_; | 45 std::unique_ptr<content::Compositor> compositor_; |
50 | 46 |
51 cc::Layer* layer_ = nullptr; | 47 cc::Layer* layer_ = nullptr; |
52 cc::Layer* layer_parent_ = nullptr; | 48 cc::Layer* layer_parent_ = nullptr; |
53 SkColor background_color_; | 49 SkColor background_color_; |
54 bool transparent_; | 50 bool transparent_; |
55 | 51 |
56 DISALLOW_COPY_AND_ASSIGN(VrCompositor); | 52 DISALLOW_COPY_AND_ASSIGN(VrCompositor); |
57 }; | 53 }; |
58 | 54 |
59 } // namespace vr_shell | 55 } // namespace vr_shell |
60 | 56 |
61 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_COMPOSITOR_H_ | 57 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_COMPOSITOR_H_ |
OLD | NEW |