Chromium Code Reviews| Index: chrome/browser/android/vr_shell/simple_compositor_view.h |
| diff --git a/chrome/browser/android/vr_shell/simple_compositor_view.h b/chrome/browser/android/vr_shell/simple_compositor_view.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..4917f52154c93dc766e223264464ee61bbdb5ed3 |
| --- /dev/null |
| +++ b/chrome/browser/android/vr_shell/simple_compositor_view.h |
| @@ -0,0 +1,55 @@ |
| +// 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.
|
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_ANDROID_VR_SHELL_SIMPLE_COMPOSITOR_VIEW_H_ |
| +#define CHROME_BROWSER_ANDROID_VR_SHELL_SIMPLE_COMPOSITOR_VIEW_H_ |
| + |
| +#include <memory> |
| + |
| +#include "base/android/scoped_java_ref.h" |
| +#include "base/macros.h" |
| +#include "content/public/browser/android/compositor_client.h" |
| + |
| +namespace cc { |
| +class Layer; |
| +} |
| + |
| +namespace content { |
| +class Compositor; |
| +class ContentViewCore; |
| +} |
| + |
| +namespace ui { |
| +class WindowAndroid; |
| +} |
| + |
| +namespace vr_shell { |
| + |
| +class SimpleCompositorView : public content::CompositorClient { |
| + public: |
| + explicit SimpleCompositorView(ui::WindowAndroid* window); |
| + ~SimpleCompositorView() override; |
| + |
| + void SurfaceDestroyed(); |
| + void SurfaceChanged(int width, |
| + int height, |
| + const base::android::JavaParamRef<jobject>& surface); |
| + void SetLayer(content::ContentViewCore* core); |
| + |
| + // CompositorClient implementation: |
| + void UpdateLayerTreeHost() override; |
| + void OnSwapBuffersCompleted(int pending_swap_buffers) override; |
| + |
| + private: |
| + std::unique_ptr<content::Compositor> compositor_; |
| + |
| + cc::Layer* layer_ = nullptr; |
| + cc::Layer* layer_parent_ = nullptr; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(SimpleCompositorView); |
| +}; |
| + |
| +} // namespace vr_shell |
| + |
| +#endif // CHROME_BROWSER_ANDROID_VR_SHELL_SIMPLE_COMPOSITOR_VIEW_H_ |