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

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

Issue 2668003003: Provide WebVR pose data only to the focused frame. (Closed)
Patch Set: Update to correct copyright notice? Created 3 years, 11 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 c75631438803f8eea31a36b2196ff535f4d52939..1a2e583d6cb702fb5da63a73c31adc90efc5dede 100644
--- a/third_party/WebKit/Source/modules/vr/VRDisplay.h
+++ b/third_party/WebKit/Source/modules/vr/VRDisplay.h
@@ -92,6 +92,8 @@ class VRDisplay final : public EventTargetWithInlineData,
// ScriptWrappable implementation.
bool hasPendingActivity() const final;
+ void focusChanged(bool focused);
+
DECLARE_VIRTUAL_TRACE();
protected:
@@ -148,7 +150,7 @@ class VRDisplay final : public EventTargetWithInlineData,
Member<VREyeParameters> m_eyeParametersLeft;
Member<VREyeParameters> m_eyeParametersRight;
device::mojom::blink::VRPosePtr m_framePose;
- int16_t m_frameId;
+ int16_t m_frameId = -1;
VRLayer m_layer;
double m_depthNear = 0.01;
double m_depthFar = 10000.0;
@@ -167,6 +169,7 @@ class VRDisplay final : public EventTargetWithInlineData,
bool m_displayBlurred = false;
bool m_reenteredFullscreen = false;
double m_timebase = -1;
+ bool m_focused = false;
device::mojom::blink::VRDisplayPtr m_display;

Powered by Google App Engine
This is Rietveld 408576698