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

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

Issue 2553753002: Prevent repeated VRDisplay.requestPresent calls from spamming the device (Closed)
Patch Set: Created 4 years 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 | « no previous file | third_party/WebKit/Source/modules/vr/VRDisplay.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7b89759129c5f9a0b5f0e1dab5084686b59d5ba3..267265c2bea0e9d3fbe24ec2e7e438a7671295df 100644
--- a/third_party/WebKit/Source/modules/vr/VRDisplay.h
+++ b/third_party/WebKit/Source/modules/vr/VRDisplay.h
@@ -94,7 +94,7 @@ class VRDisplay final : public GarbageCollectedFinalized<VRDisplay>,
void updatePose();
- void beginPresent(ScriptPromiseResolver*);
+ void beginPresent();
void forceExitPresent();
void updateLayerBounds();
@@ -104,7 +104,7 @@ class VRDisplay final : public GarbageCollectedFinalized<VRDisplay>,
private:
void onFullscreenCheck(TimerBase*);
- void onPresentComplete(ScriptPromiseResolver*, bool);
+ void onPresentComplete(bool);
void onConnected();
void onDisconnected();
@@ -153,6 +153,8 @@ class VRDisplay final : public GarbageCollectedFinalized<VRDisplay>,
device::mojom::blink::VRDisplayPtr m_display;
mojo::Binding<device::mojom::blink::VRDisplayClient> m_binding;
+
+ HeapDeque<Member<ScriptPromiseResolver>> m_pendingPresentResolvers;
};
using VRDisplayVector = HeapVector<Member<VRDisplay>>;
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/vr/VRDisplay.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698