Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: re-enable WindowCaptureMacV2 #37014

Closed
wants to merge 2 commits into from

chore: update patches

317049c
Select commit
Loading
Failed to load commit list.
Closed

fix: re-enable WindowCaptureMacV2 #37014

chore: update patches
317049c
Select commit
Loading
Failed to load commit list.
trop / Backportable? - 23-x-y completed Oct 11, 2023 in 128d 4h 46m 7s

Cancelled

This trop check was cancelled and can be ignored as this PR is no longer targeting this branch for a backport

Annotations

Check failure on line 96 in patches/chromium/desktop_media_list.patch

See this annotation in the file changed.

@trop trop / Backportable? - 23-x-y

patches/chromium/desktop_media_list.patch#L88-L96

Patch Conflict
Raw output
++<<<<<<< HEAD
 +@@ -141,7 +141,7 @@ BOOL CALLBACK AllHwndCollector(HWND hwnd, LPARAM param) {
 + #if BUILDFLAG(IS_MAC)
 + BASE_FEATURE(kWindowCaptureMacV2,
 +              "WindowCaptureMacV2",
 +-             base::FEATURE_ENABLED_BY_DEFAULT);
 ++             base::FEATURE_DISABLED_BY_DEFAULT);
 + #endif
 + 
 + }  // namespace
++=======
++>>>>>>> fix: re-enable WindowCaptureMacV2

Check failure on line 1248 in shell/browser/native_window_mac.mm

See this annotation in the file changed.

@trop trop / Backportable? - 23-x-y

shell/browser/native_window_mac.mm#L1237-L1248

Patch Conflict
Raw output
++<<<<<<< HEAD
 +  auto desktop_media_id = content::DesktopMediaID(
 +      content::DesktopMediaID::TYPE_WINDOW, GetAcceleratedWidget());
 +  // c.f.
 +  // https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/media/webrtc/native_desktop_media_list.cc;l=372?q=kWindowCaptureMacV2&ss=chromium
 +  // Refs https://github.com/electron/electron/pull/30507
 +  // TODO(deepak1556): Match upstream for `kWindowCaptureMacV2`
 +#if 0
 +    if (remote_cocoa::ScopedCGWindowID::Get(desktop_media_id.id)) {
 +      desktop_media_id.window_id = desktop_media_id.id;
 +    }
 +#endif
 +  return desktop_media_id;
++=======
+   return content::DesktopMediaID(content::DesktopMediaID::TYPE_WINDOW,
+                                  GetAcceleratedWidget());
++>>>>>>> fix: re-enable WindowCaptureMacV2

Check failure on line 125 in spec/api-desktop-capturer-spec.ts

See this annotation in the file changed.

@trop trop / Backportable? - 23-x-y

spec/api-desktop-capturer-spec.ts#L123-L125

Patch Conflict
Raw output
++<<<<<<< HEAD
 +    const w = new BrowserWindow({ show: false, width: 100, height: 100, webPreferences: { contextIsolation: false } });
 +    const wShown = emittedOnce(w, 'show');
 +    const wFocused = emittedOnce(w, 'focus');
++=======
+     const w = new BrowserWindow({
+       show: false,
+       width: 100,
+       height: 100,
+       webPreferences: { contextIsolation: false }
+     });
+     const wShown = once(w, 'show');
+     const wFocused = once(w, 'focus');
++>>>>>>> fix: re-enable WindowCaptureMacV2

Check failure on line 97 in patches/chromium/desktop_media_list.patch

See this annotation in the file changed.

@trop trop / Backportable? - 23-x-y

patches/chromium/desktop_media_list.patch#L88-L97

Patch Conflict
Raw output
++<<<<<<< HEAD
 +@@ -141,7 +141,7 @@ BOOL CALLBACK AllHwndCollector(HWND hwnd, LPARAM param) {
 + #if BUILDFLAG(IS_MAC)
 + BASE_FEATURE(kWindowCaptureMacV2,
 +              "WindowCaptureMacV2",
 +-             base::FEATURE_ENABLED_BY_DEFAULT);
 ++             base::FEATURE_DISABLED_BY_DEFAULT);
 + #endif
 + 
 + }  // namespace
 +@@ -451,6 +451,12 @@ void NativeDesktopMediaList::Worker::RefreshNextThumbnail() {
++=======
+ @@ -451,6 +451,9 @@ void NativeDesktopMediaList::Worker::RefreshNextThumbnail() {
++>>>>>>> fix: re-enable WindowCaptureMacV2

Check failure on line 1248 in shell/browser/native_window_mac.mm

See this annotation in the file changed.

@trop trop / Backportable? - 23-x-y

shell/browser/native_window_mac.mm#L1237-L1248

Patch Conflict
Raw output
++<<<<<<< HEAD
 +  auto desktop_media_id = content::DesktopMediaID(
 +      content::DesktopMediaID::TYPE_WINDOW, GetAcceleratedWidget());
 +  // c.f.
 +  // https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/media/webrtc/native_desktop_media_list.cc;l=372?q=kWindowCaptureMacV2&ss=chromium
 +  // Refs https://github.com/electron/electron/pull/30507
 +  // TODO(deepak1556): Match upstream for `kWindowCaptureMacV2`
 +#if 0
 +    if (remote_cocoa::ScopedCGWindowID::Get(desktop_media_id.id)) {
 +      desktop_media_id.window_id = desktop_media_id.id;
 +    }
 +#endif
 +  return desktop_media_id;
++=======
+   return content::DesktopMediaID(content::DesktopMediaID::TYPE_WINDOW,
+                                  GetAcceleratedWidget());
++>>>>>>> fix: re-enable WindowCaptureMacV2

Check failure on line 125 in spec/api-desktop-capturer-spec.ts

See this annotation in the file changed.

@trop trop / Backportable? - 23-x-y

spec/api-desktop-capturer-spec.ts#L123-L125

Patch Conflict
Raw output
++<<<<<<< HEAD
 +    const w = new BrowserWindow({ show: false, width: 100, height: 100, webPreferences: { contextIsolation: false } });
 +    const wShown = emittedOnce(w, 'show');
 +    const wFocused = emittedOnce(w, 'focus');
++=======
+     const w = new BrowserWindow({
+       show: false,
+       width: 100,
+       height: 100,
+       webPreferences: { contextIsolation: false }
+     });
+     const wShown = once(w, 'show');
+     const wFocused = once(w, 'focus');
++>>>>>>> fix: re-enable WindowCaptureMacV2