Bug 190728

Summary: [MediaStream] Allow ports to optionally do screen capture in the UI process
Product: WebKit Reporter: Eric Carlson <eric.carlson>
Component: WebRTCAssignee: Eric Carlson <eric.carlson>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, ews-watchlist, jer.noble, thorton, tsavell, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch for landing
none
Rebased patch for landing
none
Anothher rebased patch for landing
none
Anothher rebased patch for landing
none
Anothher rebased patch for landing none

Eric Carlson
Reported 2018-10-18 10:54:20 PDT
Allow ports to optionally do screen capture in the UI process
Attachments
Patch (57.39 KB, patch)
2018-10-18 14:12 PDT, Eric Carlson
no flags
Patch for landing (57.78 KB, patch)
2018-10-18 15:17 PDT, Eric Carlson
no flags
Rebased patch for landing (60.69 KB, patch)
2018-10-18 15:26 PDT, Eric Carlson
no flags
Anothher rebased patch for landing (60.63 KB, patch)
2018-10-18 20:48 PDT, Eric Carlson
no flags
Anothher rebased patch for landing (60.75 KB, patch)
2018-10-18 21:16 PDT, Eric Carlson
no flags
Anothher rebased patch for landing (60.78 KB, patch)
2018-10-18 21:41 PDT, Eric Carlson
no flags
Radar WebKit Bug Importer
Comment 1 2018-10-18 11:09:29 PDT
Eric Carlson
Comment 2 2018-10-18 14:12:50 PDT
EWS Watchlist
Comment 3 2018-10-18 14:15:58 PDT
Attachment 352731 [details] did not pass style-queue: ERROR: Source/WebCore/platform/mediastream/RealtimeMediaSource.h:170: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4] ERROR: Source/WebCore/platform/mediastream/RealtimeMediaSource.h:171: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4] Total errors found: 2 in 26 files If any of these errors are false positives, please file a bug against check-webkit-style.
Tim Horton
Comment 4 2018-10-18 14:25:24 PDT
Comment on attachment 352731 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=352731&action=review > Source/WebCore/platform/graphics/RemoteVideoSample.cpp:47 > + WebCore::IOSurface::moveToPool(WTFMove(m_ioSurface)); You should only pool your surfaces if you're sure that everything that you use them for correctly maintains the IsInUse bits (otherwise we might re-use them while still in use). It seems likely that CV does this correctly, but it's good to be sure. > Source/WebCore/platform/graphics/RemoteVideoSample.h:38 > + RemoteVideoSample() = default; Should the constructor really be public? Don't you want everyone using the ::create methods? > Source/WebCore/platform/graphics/RemoteVideoSample.h:41 > +#if HAVE(IOSURFACE) Or maybe not? You have no `::create`s if !HAVE(IOSURFACE), should the whole class just go away? > Source/WebCore/platform/graphics/RemoteVideoSample.h:59 > + encoder << WTF::MachSendRight(); This is interesting. Maybe OK to encode an empty send right, but maybe it should just be an optional instead? I'm not sure. > Source/WebCore/platform/mediastream/RealtimeVideoSource.cpp:400 > + if (!size.isEmpty() && size != roundedIntSize(sample.presentationSize())) { How did the sample size ever end up non-integer? Is rounding right, or enclosing?
Tim Horton
Comment 5 2018-10-18 14:25:40 PDT
I didn't mean to reset jer's review, sorry jer.
Eric Carlson
Comment 6 2018-10-18 14:57:27 PDT
Comment on attachment 352731 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=352731&action=review >> Source/WebCore/platform/graphics/RemoteVideoSample.cpp:47 >> + WebCore::IOSurface::moveToPool(WTFMove(m_ioSurface)); > > You should only pool your surfaces if you're sure that everything that you use them for correctly maintains the IsInUse bits (otherwise we might re-use them while still in use). It seems likely that CV does this correctly, but it's good to be sure. Removed. >> Source/WebCore/platform/graphics/RemoteVideoSample.h:38 >> + RemoteVideoSample() = default; > > Should the constructor really be public? Don't you want everyone using the ::create methods? Nope, made private. >> Source/WebCore/platform/graphics/RemoteVideoSample.h:59 >> + encoder << WTF::MachSendRight(); > > This is interesting. Maybe OK to encode an empty send right, but maybe it should just be an optional instead? I'm not sure. I copied this from RemoteLayerBackingStore::encode so I'll leave it for now anyway. >> Source/WebCore/platform/mediastream/RealtimeVideoSource.cpp:400 >> + if (!size.isEmpty() && size != roundedIntSize(sample.presentationSize())) { > > How did the sample size ever end up non-integer? Is rounding right, or enclosing? Good point, I'll change it to expandedIntSize()
Eric Carlson
Comment 7 2018-10-18 15:17:03 PDT
Created attachment 352739 [details] Patch for landing
Eric Carlson
Comment 8 2018-10-18 15:26:50 PDT
Created attachment 352740 [details] Rebased patch for landing
EWS Watchlist
Comment 9 2018-10-18 15:29:14 PDT
Attachment 352740 [details] did not pass style-queue: ERROR: Source/WebCore/platform/mediastream/RealtimeMediaSource.h:170: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4] ERROR: Source/WebCore/platform/mediastream/RealtimeMediaSource.h:171: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4] Total errors found: 2 in 27 files If any of these errors are false positives, please file a bug against check-webkit-style.
WebKit Commit Bot
Comment 10 2018-10-18 15:52:25 PDT
Comment on attachment 352740 [details] Rebased patch for landing Clearing flags on attachment: 352740 Committed r237272: <https://trac.webkit.org/changeset/237272>
Truitt Savell
Comment 11 2018-10-18 16:44:09 PDT
Reverted r237272 for reason: Broke on device iOS builds and Windows builds Committed r237275: <https://trac.webkit.org/changeset/237275>
Eric Carlson
Comment 13 2018-10-18 20:48:49 PDT
Created attachment 352761 [details] Anothher rebased patch for landing
EWS Watchlist
Comment 14 2018-10-18 20:59:37 PDT
Attachment 352761 [details] did not pass style-queue: ERROR: Source/WebCore/platform/mediastream/RealtimeMediaSource.h:170: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4] ERROR: Source/WebCore/platform/mediastream/RealtimeMediaSource.h:171: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4] Total errors found: 2 in 27 files If any of these errors are false positives, please file a bug against check-webkit-style.
Eric Carlson
Comment 15 2018-10-18 21:16:50 PDT
Created attachment 352763 [details] Anothher rebased patch for landing
EWS Watchlist
Comment 16 2018-10-18 21:19:02 PDT
Attachment 352763 [details] did not pass style-queue: ERROR: Source/WebCore/platform/mediastream/RealtimeMediaSource.h:170: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4] ERROR: Source/WebCore/platform/mediastream/RealtimeMediaSource.h:171: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4] Total errors found: 2 in 27 files If any of these errors are false positives, please file a bug against check-webkit-style.
Eric Carlson
Comment 17 2018-10-18 21:41:49 PDT
Created attachment 352764 [details] Anothher rebased patch for landing
EWS Watchlist
Comment 18 2018-10-18 21:43:21 PDT
Attachment 352764 [details] did not pass style-queue: ERROR: Source/WebCore/platform/mediastream/RealtimeMediaSource.h:170: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4] ERROR: Source/WebCore/platform/mediastream/RealtimeMediaSource.h:171: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4] Total errors found: 2 in 27 files If any of these errors are false positives, please file a bug against check-webkit-style.
WebKit Commit Bot
Comment 19 2018-10-18 22:22:23 PDT
Comment on attachment 352764 [details] Anothher rebased patch for landing Clearing flags on attachment: 352764 Committed r237281: <https://trac.webkit.org/changeset/237281>
WebKit Commit Bot
Comment 20 2018-10-18 22:22:25 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.