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

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

Issue 2738683002: WebVR compositor bypass via BrowserMain context + mailbox (Closed)
Patch Set: Less hacked up version Created 3 years, 9 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
« no previous file with comments | « third_party/WebKit/Source/modules/vr/DEPS ('k') | 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 af955c5091b8593e17a0810ed81e71b42581ee3a..07e169809c5cbda73d180302fc44ca6735a90156 100644
--- a/third_party/WebKit/Source/modules/vr/VRDisplay.h
+++ b/third_party/WebKit/Source/modules/vr/VRDisplay.h
@@ -41,7 +41,8 @@ enum VREye { VREyeNone, VREyeLeft, VREyeRight };
class VRDisplay final : public EventTargetWithInlineData,
public ActiveScriptWrappable<VRDisplay>,
public ContextLifecycleObserver,
- public device::mojom::blink::VRDisplayClient {
+ public device::mojom::blink::VRDisplayClient,
+ public device::mojom::blink::VRSubmitFrameClient {
DEFINE_WRAPPERTYPEINFO();
USING_GARBAGE_COLLECTED_MIXIN(VRDisplay);
USING_PRE_FINALIZER(VRDisplay, dispose);
@@ -116,7 +117,6 @@ class VRDisplay final : public EventTargetWithInlineData,
VRController* controller();
private:
- void onFullscreenCheck(TimerBase*);
void onPresentComplete(bool);
void onConnected();
@@ -126,6 +126,10 @@ class VRDisplay final : public EventTargetWithInlineData,
void OnPresentChange();
+ // VRSubmitFrameClient
+ void OnSubmitFrameTransferred();
+ void OnSubmitFrameRendered();
+
// VRDisplayClient
void OnChanged(device::mojom::blink::VRDisplayInfoPtr) override;
void OnExitPresent() override;
@@ -162,24 +166,33 @@ class VRDisplay final : public EventTargetWithInlineData,
double m_depthNear = 0.01;
double m_depthFar = 10000.0;
+ // Current dimensions of the WebVR source canvas. May be different from
+ // the recommended renderWidth/Height if the client overrides dimensions.
+ int m_sourceWidth = 0;
+ int m_sourceHeight = 0;
+
void dispose();
- TaskRunnerTimer<VRDisplay> m_fullscreenCheckTimer;
- String m_fullscreenOrigWidth;
- String m_fullscreenOrigHeight;
gpu::gles2::GLES2Interface* m_contextGL = nullptr;
Member<WebGLRenderingContextBase> m_renderingContext;
+ // Used to keep the image alive until the next frame if using
+ // waitForPreviousTransferToFinish.
+ RefPtr<Image> m_previousImage;
+
Member<ScriptedAnimationController> m_scriptedAnimationController;
bool m_pendingRaf = false;
bool m_pendingVsync = false;
bool m_inAnimationFrame = false;
bool m_displayBlurred = false;
- bool m_reenteredFullscreen = false;
double m_timebase = -1;
+ bool m_pendingPreviousFrameRender = false;
+ bool m_pendingSubmitFrame = false;
device::mojom::blink::VRDisplayPtr m_display;
+ mojo::Binding<device::mojom::blink::VRSubmitFrameClient>
+ m_submit_frame_client_binding;
mojo::Binding<device::mojom::blink::VRDisplayClient> m_displayClientBinding;
device::mojom::blink::VRVSyncProviderPtr m_vrVSyncProvider;
« no previous file with comments | « third_party/WebKit/Source/modules/vr/DEPS ('k') | third_party/WebKit/Source/modules/vr/VRDisplay.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698