Title: [258329] trunk/Source/WebKit
Revision
258329
Author
[email protected]
Date
2020-03-12 08:36:33 -0700 (Thu, 12 Mar 2020)

Log Message

Provide orientation to GPUProcess when it will start to capture
https://bugs.webkit.org/show_bug.cgi?id=208911

Reviewed by Eric Carlson.

Provide orientation to GPUProcess whenever starting to capture.
This fixes the case of spinning the GPUProcess/starting capture in landscape mode.
Do not send orientation to GPUProcess if it is not yet started as an optimization.

Manually tested.

* UIProcess/WebPageProxy.cpp:

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (258328 => 258329)


--- trunk/Source/WebKit/ChangeLog	2020-03-12 15:25:47 UTC (rev 258328)
+++ trunk/Source/WebKit/ChangeLog	2020-03-12 15:36:33 UTC (rev 258329)
@@ -1,3 +1,18 @@
+2020-03-12  Youenn Fablet  <[email protected]>
+
+        Provide orientation to GPUProcess when it will start to capture
+        https://bugs.webkit.org/show_bug.cgi?id=208911
+
+        Reviewed by Eric Carlson.
+
+        Provide orientation to GPUProcess whenever starting to capture.
+        This fixes the case of spinning the GPUProcess/starting capture in landscape mode.
+        Do not send orientation to GPUProcess if it is not yet started as an optimization.
+
+        Manually tested.
+
+        * UIProcess/WebPageProxy.cpp:
+
 2020-03-12  Eric Carlson  <[email protected]>
 
         Remove TextTrackPrivateRemote.messages.in

Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (258328 => 258329)


--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp	2020-03-12 15:25:47 UTC (rev 258328)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp	2020-03-12 15:36:33 UTC (rev 258329)
@@ -7928,6 +7928,9 @@
 
     auto& gpuProcess = GPUProcessProxy::singleton();
     gpuProcess.updateCaptureAccess(request.requiresAudioCapture(), request.requiresVideoCapture(), request.requiresDisplayCapture(), m_process->coreProcessIdentifier(), WTFMove(callback));
+#if PLATFORM(IOS_FAMILY)
+    GPUProcessProxy::singleton().setOrientationForMediaCapture(m_deviceOrientation);
+#endif
 #else
     callback();
 #endif
@@ -9939,8 +9942,9 @@
     if (auto* proxy = m_process->userMediaCaptureManagerProxy())
         proxy->setOrientation(orientation);
 
-    if (preferences().captureVideoInGPUProcessEnabled())
-        GPUProcessProxy::singleton().setOrientationForMediaCapture(orientation);
+    auto* gpuProcess = GPUProcessProxy::singletonIfCreated();
+    if (gpuProcess && preferences().captureVideoInGPUProcessEnabled())
+        gpuProcess->setOrientationForMediaCapture(orientation);
 #endif
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to