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

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

Issue 2550863002: Prevent repeated VRDisplay.requestPresent calls from spamming the device (Closed)
Patch Set: Minor cleanup 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 eda53a05f8e9ab7d679e7395705aac287d7a8d68..45fa373749a3e09edda7789103eb97f8031e4e75 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();
@@ -154,6 +154,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