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

Unified Diff: chrome/browser/android/vr_shell/vr_shell_gl.h

Issue 2861343002: Enable gpu rasterization in the vr shell
Patch Set: additional trace instrumentation Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/android/vr_shell/ui_scene.cc ('k') | chrome/browser/android/vr_shell/vr_shell_gl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « chrome/browser/android/vr_shell/ui_scene.cc ('k') | chrome/browser/android/vr_shell/vr_shell_gl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698