WebKit Bugzilla
Attachment 369623 Details for
Bug 197804
: Use the main screen for screen capture
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-197804-20190510165636.patch (text/plain), 2.32 KB, created by
youenn fablet
on 2019-05-10 16:56:37 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
youenn fablet
Created:
2019-05-10 16:56:37 PDT
Size:
2.32 KB
patch
obsolete
>Subversion Revision: 245178 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 456caefff399927b540bf42aba3ca5fe575e484b..71ce07311f9042abfcb751e298c35361f67824ba 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,20 @@ >+2019-05-10 Youenn Fablet <youenn@apple.com> >+ >+ Use the main screen for screen capture >+ https://bugs.webkit.org/show_bug.cgi?id=197804 >+ <rdar://problem/47671383> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ If the main screen, i.e. the screen that has focus at the time of >+ selection of the screen to capture, is capturable, add it to the list >+ of screen devices, but do not add any other screen. >+ This will make sure the main screen is selected. >+ Manually tested. >+ >+ * platform/mediastream/mac/ScreenDisplayCaptureSourceMac.mm: >+ (WebCore::ScreenDisplayCaptureSourceMac::screenCaptureDevices): >+ > 2019-05-10 Youenn Fablet <youenn@apple.com> > > A service worker instance should be terminated when its SWServer is destroyed >diff --git a/Source/WebCore/platform/mediastream/mac/ScreenDisplayCaptureSourceMac.mm b/Source/WebCore/platform/mediastream/mac/ScreenDisplayCaptureSourceMac.mm >index f6d631e47b103fa1a592023ab5acdcc6f4a13566..087ad0a829e0f93d5986493f4aad7c424203da96 100644 >--- a/Source/WebCore/platform/mediastream/mac/ScreenDisplayCaptureSourceMac.mm >+++ b/Source/WebCore/platform/mediastream/mac/ScreenDisplayCaptureSourceMac.mm >@@ -35,6 +35,7 @@ > #include "MediaSampleAVFObjC.h" > #include "NotImplemented.h" > #include "PlatformLayer.h" >+#include "PlatformScreen.h" > #include "RealtimeMediaSourceSettings.h" > #include "RealtimeVideoUtilities.h" > >@@ -303,6 +304,14 @@ Optional<CaptureDevice> ScreenDisplayCaptureSourceMac::screenCaptureDeviceWithPe > > void ScreenDisplayCaptureSourceMac::screenCaptureDevices(Vector<CaptureDevice>& displays) > { >+ auto screenID = displayID([NSScreen mainScreen]); >+ if (CGDisplayIDToOpenGLDisplayMask(screenID)) { >+ CaptureDevice displayDevice(String::number(screenID), CaptureDevice::DeviceType::Screen, makeString("Screen 0")); >+ displayDevice.setEnabled(true); >+ displays.append(WTFMove(displayDevice)); >+ return; >+ } >+ > uint32_t displayCount = 0; > auto err = CGGetActiveDisplayList(0, nullptr, &displayCount); > if (err) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 197804
: 369623