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

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

Issue 2926953002: Fix WebVR so we don't animation when stopped at a JS breakpoint (Closed)
Patch Set: Created 3 years, 6 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 308ed3ff81c698d2a7ecad77b360dcd8777719d1..f2f8e2f36e25a9f133c0b564548dd3ca56c9d025 100644
--- a/third_party/WebKit/Source/modules/vr/VRDisplay.h
+++ b/third_party/WebKit/Source/modules/vr/VRDisplay.h
@@ -18,6 +18,8 @@
#include "platform/wtf/text/WTFString.h"
#include "public/platform/WebGraphicsContext3DProvider.h"
+#include "core/dom/SuspendableObject.h"
+
namespace gpu {
namespace gles2 {
class GLES2Interface;
@@ -39,7 +41,7 @@ enum VREye { kVREyeNone, kVREyeLeft, kVREyeRight };
class VRDisplay final : public EventTargetWithInlineData,
public ActiveScriptWrappable<VRDisplay>,
- public ContextLifecycleObserver,
+ public SuspendableObject,
public device::mojom::blink::VRDisplayClient,
public device::mojom::blink::VRSubmitFrameClient {
DEFINE_WRAPPERTYPEINFO();
@@ -89,6 +91,10 @@ class VRDisplay final : public EventTargetWithInlineData,
// ScriptWrappable implementation.
bool HasPendingActivity() const final;
+ // SuspendableObject:
+ void Suspend() override;
+ void Resume() override;
+
void FocusChanged();
DECLARE_VIRTUAL_TRACE();
@@ -209,6 +215,9 @@ class VRDisplay final : public EventTargetWithInlineData,
device::mojom::blink::VRVSyncProviderPtr vr_v_sync_provider_;
HeapDeque<Member<ScriptPromiseResolver>> pending_present_resolvers_;
+
+ bool suspended_ = false;
haraken 2017/06/08 00:55:12 You can drop this flag and instead use executionCo
billorr 2017/06/08 04:20:21 Done.
+ bool request_vsync_on_resume_ = false;
};
using VRDisplayVector = HeapVector<Member<VRDisplay>>;
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/vr/VRDisplay.cpp » ('j') | third_party/WebKit/Source/modules/vr/VRDisplay.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698