| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef VRDisplay_h | 5 #ifndef VRDisplay_h |
| 6 #define VRDisplay_h | 6 #define VRDisplay_h |
| 7 | 7 |
| 8 #include "core/dom/Document.h" | 8 #include "core/dom/Document.h" |
| 9 #include "core/dom/FrameRequestCallback.h" | 9 #include "core/dom/FrameRequestCallback.h" |
| 10 #include "core/events/EventTarget.h" | 10 #include "core/events/EventTarget.h" |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 | 109 |
| 110 void beginPresent(); | 110 void beginPresent(); |
| 111 void forceExitPresent(); | 111 void forceExitPresent(); |
| 112 | 112 |
| 113 void updateLayerBounds(); | 113 void updateLayerBounds(); |
| 114 void disconnected(); | 114 void disconnected(); |
| 115 | 115 |
| 116 VRController* controller(); | 116 VRController* controller(); |
| 117 | 117 |
| 118 private: | 118 private: |
| 119 void onFullscreenCheck(TimerBase*); | |
| 120 void onPresentComplete(bool); | 119 void onPresentComplete(bool); |
| 121 | 120 |
| 122 void onConnected(); | 121 void onConnected(); |
| 123 void onDisconnected(); | 122 void onDisconnected(); |
| 124 | 123 |
| 125 void stopPresenting(); | 124 void stopPresenting(); |
| 126 | 125 |
| 127 void OnPresentChange(); | 126 void OnPresentChange(); |
| 128 | 127 |
| 129 // VRDisplayClient | 128 // VRDisplayClient |
| (...skipping 27 matching lines...) Expand all Loading... |
| 157 // This frame ID is vr-specific and is used to track when frames arrive at the | 156 // This frame ID is vr-specific and is used to track when frames arrive at the |
| 158 // VR compositor so that it knows which poses to use, when to apply bounds | 157 // VR compositor so that it knows which poses to use, when to apply bounds |
| 159 // updates, etc. | 158 // updates, etc. |
| 160 int16_t m_vrFrameId = -1; | 159 int16_t m_vrFrameId = -1; |
| 161 VRLayer m_layer; | 160 VRLayer m_layer; |
| 162 double m_depthNear = 0.01; | 161 double m_depthNear = 0.01; |
| 163 double m_depthFar = 10000.0; | 162 double m_depthFar = 10000.0; |
| 164 | 163 |
| 165 void dispose(); | 164 void dispose(); |
| 166 | 165 |
| 167 TaskRunnerTimer<VRDisplay> m_fullscreenCheckTimer; | |
| 168 String m_fullscreenOrigWidth; | |
| 169 String m_fullscreenOrigHeight; | |
| 170 gpu::gles2::GLES2Interface* m_contextGL = nullptr; | 166 gpu::gles2::GLES2Interface* m_contextGL = nullptr; |
| 171 Member<WebGLRenderingContextBase> m_renderingContext; | 167 Member<WebGLRenderingContextBase> m_renderingContext; |
| 172 | 168 |
| 173 Member<ScriptedAnimationController> m_scriptedAnimationController; | 169 Member<ScriptedAnimationController> m_scriptedAnimationController; |
| 174 bool m_pendingRaf = false; | 170 bool m_pendingRaf = false; |
| 175 bool m_pendingVsync = false; | 171 bool m_pendingVsync = false; |
| 176 bool m_inAnimationFrame = false; | 172 bool m_inAnimationFrame = false; |
| 177 bool m_displayBlurred = false; | 173 bool m_displayBlurred = false; |
| 178 bool m_reenteredFullscreen = false; | |
| 179 double m_timebase = -1; | 174 double m_timebase = -1; |
| 180 | 175 |
| 181 device::mojom::blink::VRDisplayPtr m_display; | 176 device::mojom::blink::VRDisplayPtr m_display; |
| 182 | 177 |
| 183 mojo::Binding<device::mojom::blink::VRDisplayClient> m_displayClientBinding; | 178 mojo::Binding<device::mojom::blink::VRDisplayClient> m_displayClientBinding; |
| 184 device::mojom::blink::VRVSyncProviderPtr m_vrVSyncProvider; | 179 device::mojom::blink::VRVSyncProviderPtr m_vrVSyncProvider; |
| 185 | 180 |
| 186 HeapDeque<Member<ScriptPromiseResolver>> m_pendingPresentResolvers; | 181 HeapDeque<Member<ScriptPromiseResolver>> m_pendingPresentResolvers; |
| 187 }; | 182 }; |
| 188 | 183 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 204 RequestDenied = 12, | 199 RequestDenied = 12, |
| 205 FullscreenNotEnabled = 13, | 200 FullscreenNotEnabled = 13, |
| 206 PresentationResultMax, // Must be last member of enum. | 201 PresentationResultMax, // Must be last member of enum. |
| 207 }; | 202 }; |
| 208 | 203 |
| 209 void ReportPresentationResult(PresentationResult); | 204 void ReportPresentationResult(PresentationResult); |
| 210 | 205 |
| 211 } // namespace blink | 206 } // namespace blink |
| 212 | 207 |
| 213 #endif // VRDisplay_h | 208 #endif // VRDisplay_h |
| OLD | NEW |