Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
|
bshe
2016/09/12 16:39:56
This is no longer a view, perhaps rename to simple
mthiesse
2016/09/12 21:46:04
Done.
| |
| 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_SIMPLE_COMPOSITOR_VIEW_H_ | |
| 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_SIMPLE_COMPOSITOR_VIEW_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 SimpleCompositorView : public content::CompositorClient { | |
| 30 public: | |
| 31 explicit SimpleCompositorView(ui::WindowAndroid* window); | |
| 32 ~SimpleCompositorView() 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(SimpleCompositorView); | |
| 51 }; | |
| 52 | |
| 53 } // namespace vr_shell | |
| 54 | |
| 55 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_SIMPLE_COMPOSITOR_VIEW_H_ | |
| OLD | NEW |