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

Unified Diff: third_party/WebKit/Source/modules/vr/VRDisplay.h

Issue 2413903002: Allow VRDisplay to manage it's own rAF callbacks (Closed)
Patch Set: Address review feedback Created 4 years, 2 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
Index: third_party/WebKit/Source/modules/vr/VRDisplay.h
diff --git a/third_party/WebKit/Source/modules/vr/VRDisplay.h b/third_party/WebKit/Source/modules/vr/VRDisplay.h
index 6eebc631884e67f64116ea6762f15e940893ea67..9b12cfecda8be5b9be99b98cad360617536d2b87 100644
--- a/third_party/WebKit/Source/modules/vr/VRDisplay.h
+++ b/third_party/WebKit/Source/modules/vr/VRDisplay.h
@@ -26,6 +26,7 @@ class GLES2Interface;
namespace blink {
class NavigatorVR;
+class ScriptedAnimationController;
class VRController;
class VREyeParameters;
class VRFrameData;
@@ -66,6 +67,7 @@ class VRDisplay final : public GarbageCollectedFinalized<VRDisplay>,
int requestAnimationFrame(FrameRequestCallback*);
void cancelAnimationFrame(int id);
+ void serviceScriptedAnimations(double monotonicAnimationStartTime);
ScriptPromise requestPresent(ScriptState*, const HeapVector<VRLayer>& layers);
ScriptPromise exitPresent(ScriptState*);
@@ -96,6 +98,8 @@ class VRDisplay final : public GarbageCollectedFinalized<VRDisplay>,
private:
void onFullscreenCheck(TimerBase*);
+ ScriptedAnimationController& ensureScriptedAnimationController(Document*);
+
Member<NavigatorVR> m_navigatorVR;
unsigned m_displayId;
String m_displayName;
@@ -115,6 +119,10 @@ class VRDisplay final : public GarbageCollectedFinalized<VRDisplay>,
Timer<VRDisplay> m_fullscreenCheckTimer;
gpu::gles2::GLES2Interface* m_contextGL;
Member<WebGLRenderingContextBase> m_renderingContext;
+
+ Member<ScriptedAnimationController> m_scriptedAnimationController;
+ bool m_animationCallbackRequested;
+ bool m_inAnimationFrame;
};
using VRDisplayVector = HeapVector<Member<VRDisplay>>;
« no previous file with comments | « third_party/WebKit/Source/core/dom/ScriptedAnimationController.h ('k') | third_party/WebKit/Source/modules/vr/VRDisplay.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698