| Index: chrome/browser/android/vr_shell/vr_shell_gl.h
|
| diff --git a/chrome/browser/android/vr_shell/vr_shell_gl.h b/chrome/browser/android/vr_shell/vr_shell_gl.h
|
| index df5d8a107200cfd8e30923f76fd5926eb73e24c3..a615f1bf6522affdfa473289e92bd498e2b37dfa 100644
|
| --- a/chrome/browser/android/vr_shell/vr_shell_gl.h
|
| +++ b/chrome/browser/android/vr_shell/vr_shell_gl.h
|
| @@ -16,6 +16,7 @@
|
| #include "base/memory/weak_ptr.h"
|
| #include "base/single_thread_task_runner.h"
|
| #include "chrome/browser/android/vr_shell/vr_controller_model.h"
|
| +#include "chrome/browser/android/vr_shell/vr_surface_provider.h"
|
| #include "device/vr/vr_service.mojom.h"
|
| #include "device/vr/vr_types.h"
|
| #include "mojo/public/cpp/bindings/binding.h"
|
| @@ -23,6 +24,9 @@
|
| #include "third_party/gvr-android-sdk/src/libraries/headers/vr/gvr/capi/include/gvr_types.h"
|
| #include "ui/gfx/native_widget_types.h"
|
|
|
| +class GrContext;
|
| +struct GrGLInterface;
|
| +
|
| namespace blink {
|
| class WebInputEvent;
|
| }
|
| @@ -61,7 +65,8 @@ struct WebVrBounds {
|
|
|
| // This class manages all GLThread owned objects and GL rendering for VrShell.
|
| // It is not threadsafe and must only be used on the GL thread.
|
| -class VrShellGl : public device::mojom::VRVSyncProvider {
|
| +class VrShellGl : public device::mojom::VRVSyncProvider,
|
| + public VrSurfaceProvider {
|
| public:
|
| enum class InputTarget {
|
| NONE = 0,
|
| @@ -151,6 +156,9 @@ class VrShellGl : public device::mojom::VRVSyncProvider {
|
| // VRVSyncProvider
|
| void GetVSync(const GetVSyncCallback& callback) override;
|
|
|
| + // VrSurfaceProvider
|
| + sk_sp<SkSurface> MakeSurface(int width, int height) override;
|
| +
|
| void ForceExitVr();
|
|
|
| void SendVSync(base::TimeDelta time, const GetVSyncCallback& callback);
|
| @@ -165,6 +173,9 @@ class VrShellGl : public device::mojom::VRVSyncProvider {
|
| scoped_refptr<gl::SurfaceTexture> content_surface_texture_;
|
| scoped_refptr<gl::SurfaceTexture> webvr_surface_texture_;
|
|
|
| + GrContext* gr_context_ = nullptr;
|
| + const GrGLInterface* gr_interface_ = nullptr;
|
| +
|
| std::unique_ptr<gl::ScopedJavaSurface> content_surface_;
|
|
|
| std::unique_ptr<gvr::GvrApi> gvr_api_;
|
|
|