Split VrShellGl into a compositor and scheduler delegates
The delegates communicate through 2 channels in the android
implementation:
1. WebXrPresentationState, owned by the scheduler.
2. The public interface of VrShellGl. Ideally, this interface should
remain very small to ensure the task separation.
VrShellGl now only implements the CompositorDelegate, and it's soon to
be renamed. RenderLoop now owns the delegates.
Bug: 875291
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:linux_vr;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: Ia30e62ed249b5fc0682b8f2b943eef615408daa3
Reviewed-on: https://chromium-review.googlesource.com/1191864
Commit-Queue: Aldo Culquicondor <[email protected]>
Reviewed-by: Klaus Weidner <[email protected]>
Reviewed-by: Michael Thiessen <[email protected]>
Cr-Commit-Position: refs/heads/master@{#589342}
diff --git a/chrome/browser/vr/scheduler_ui_interface.h b/chrome/browser/vr/scheduler_ui_interface.h
new file mode 100644
index 0000000..c8407f6
--- /dev/null
+++ b/chrome/browser/vr/scheduler_ui_interface.h
@@ -0,0 +1,26 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_VR_SCHEDULER_UI_INTERFACE_H_
+#define CHROME_BROWSER_VR_SCHEDULER_UI_INTERFACE_H_
+
+#include <utility>
+
+#include "chrome/browser/vr/gl_texture_location.h"
+#include "chrome/browser/vr/vr_export.h"
+
+namespace vr {
+
+class VR_EXPORT SchedulerUiInterface {
+ public:
+ virtual ~SchedulerUiInterface() {}
+
+ virtual void OnWebXrFrameAvailable() = 0;
+ virtual void OnWebXrTimedOut() = 0;
+ virtual void OnWebXrTimeoutImminent() = 0;
+};
+
+} // namespace vr
+
+#endif // CHROME_BROWSER_VR_SCHEDULER_UI_INTERFACE_H_