Skip to content

Commit

Permalink
update patches
Browse files Browse the repository at this point in the history
  • Loading branch information
electron-bot committed Nov 12, 2020
1 parent 94ac817 commit 130af11
Show file tree
Hide file tree
Showing 16 changed files with 76 additions and 76 deletions.
Expand Up @@ -211,7 +211,7 @@ diff --git a/ui/accessibility/platform/ax_platform_node_mac.mm b/ui/accessibilit
index 0454164364c6a4a1b1c11011603af5978d2b8ef5..bd9e17f1e21bd17a68988ee3c9ab08f2a1d99b2e 100644
--- a/ui/accessibility/platform/ax_platform_node_mac.mm
+++ b/ui/accessibility/platform/ax_platform_node_mac.mm
@@ -1257,11 +1257,6 @@ - (NSRange)accessibilityRangeForPosition:(NSPoint)point {
@@ -1257,11 +1257,6 @@ void AXPlatformNodeMac::AnnounceText(const base::string16& text) {
[native_node_ AXWindow], false);
}

Expand Down
Expand Up @@ -23,7 +23,7 @@ diff --git a/content/browser/accessibility/browser_accessibility_manager_mac.mm
index 33324bbca5953f6f2f9d829e4c7b5d7daa3f49ea..a27cacfd303706ef3ee637107d2de0c8839bfa20 100644
--- a/content/browser/accessibility/browser_accessibility_manager_mac.mm
+++ b/content/browser/accessibility/browser_accessibility_manager_mac.mm
@@ -143,11 +143,6 @@
@@ -143,11 +143,6 @@ BrowserAccessibility* BrowserAccessibilityManagerMac::GetFocus() const {
if (!focus)
return nullptr;

Expand Down
2 changes: 1 addition & 1 deletion patches/chromium/command-ismediakey.patch
Expand Up @@ -74,7 +74,7 @@ index 85378bb565de617b1bd611d28c8714361747a357..36de4c0b0353be2418dacd388e92d7c3
}
return VKEY_UNKNOWN;
}
@@ -192,7 +198,10 @@ static CGEventRef EventTapCallback(CGEventTapProxy proxy,
@@ -192,7 +198,10 @@ CGEventRef MediaKeysListenerImpl::EventTapCallback(CGEventTapProxy proxy,
int key_code = (data1 & 0xFFFF0000) >> 16;
if (key_code != NX_KEYTYPE_PLAY && key_code != NX_KEYTYPE_NEXT &&
key_code != NX_KEYTYPE_PREVIOUS && key_code != NX_KEYTYPE_FAST &&
Expand Down
4 changes: 2 additions & 2 deletions patches/chromium/crash_allow_setting_more_options.patch
Expand Up @@ -139,7 +139,7 @@ diff --git a/components/crash/core/app/crashpad_mac.mm b/components/crash/core/a
index b579521d55860823722df2ee849f6b1628b3c950..f4f71e5174cf8fb706a2f8385252ba877d1a03a7 100644
--- a/components/crash/core/app/crashpad_mac.mm
+++ b/components/crash/core/app/crashpad_mac.mm
@@ -67,6 +67,8 @@
@@ -67,6 +67,8 @@ std::map<std::string, std::string> GetProcessSimpleAnnotations() {
} // @autoreleasepool
return process_annotations;
}();
Expand All @@ -148,7 +148,7 @@ index b579521d55860823722df2ee849f6b1628b3c950..f4f71e5174cf8fb706a2f8385252ba87
return annotations;
}

@@ -140,9 +142,17 @@ void DumpProcessWithoutCrashing(task_t task_port) {
@@ -140,9 +142,17 @@ base::FilePath PlatformCrashpadInitialization(
#else
std::string url;
#endif
Expand Down
2 changes: 1 addition & 1 deletion patches/chromium/disable_compositor_recycling.patch
Expand Up @@ -9,7 +9,7 @@ diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/cont
index f293a15c6145422707c22aeb5a254ad71a31900c..472869202ff8a62d854c9ca39ca9f14e2f91e8cf 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -472,7 +472,11 @@
@@ -472,7 +472,11 @@ void RenderWidgetHostViewMac::WasOccluded() {
return;

host()->WasHidden();
Expand Down
Expand Up @@ -105,7 +105,7 @@ diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/cont
index 472869202ff8a62d854c9ca39ca9f14e2f91e8cf..17e3fe40522e088057eaf01a290b658a0b6d1d01 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -1799,15 +1799,15 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
@@ -1799,15 +1799,15 @@ void RenderWidgetHostViewMac::ExecuteEditCommand(const std::string& command) {
}

void RenderWidgetHostViewMac::Undo() {
Expand All @@ -127,7 +127,7 @@ index 472869202ff8a62d854c9ca39ca9f14e2f91e8cf..17e3fe40522e088057eaf01a290b658a
}

void RenderWidgetHostViewMac::Cut() {
@@ -1835,9 +1835,9 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
@@ -1835,9 +1835,9 @@ void RenderWidgetHostViewMac::Paste() {
}

void RenderWidgetHostViewMac::PasteAndMatchStyle() {
Expand All @@ -144,7 +144,7 @@ diff --git a/content/browser/renderer_host/render_widget_host_view_mac_editcomma
index 760e47e9edd7b92b7bc6074f6da9c76048be8f28..2b0f1135e584852048081629eb6297e4e1fcc574 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper_unittest.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper_unittest.mm
@@ -91,9 +91,12 @@ void ExecuteEditCommand(
@@ -91,9 +91,12 @@ class RenderWidgetHostDelegateEditCommandCounter
const base::Optional<base::string16>& value) override {
edit_command_message_count_++;
}
Expand All @@ -161,7 +161,7 @@ diff --git a/content/browser/renderer_host/text_input_client_mac_unittest.mm b/c
index 158e0507af7433e16c47227e7519b12e14554f1b..e7b8109cdc78e76d737bd0c067f8d33e0c171117 100644
--- a/content/browser/renderer_host/text_input_client_mac_unittest.mm
+++ b/content/browser/renderer_host/text_input_client_mac_unittest.mm
@@ -40,9 +40,12 @@
@@ -40,9 +40,12 @@ class MockRenderWidgetHostDelegate : public RenderWidgetHostDelegate {
void ExecuteEditCommand(
const std::string& command,
const base::Optional<base::string16>& value) override {}
Expand Down
Expand Up @@ -12,7 +12,7 @@ diff --git a/chrome/browser/extensions/global_shortcut_listener_mac.mm b/chrome/
index befe726af9c10b1563a7fc0bb77cc55f65943d5c..bac51f33f35f96fe4ecc764cf5ca887176642f74 100644
--- a/chrome/browser/extensions/global_shortcut_listener_mac.mm
+++ b/chrome/browser/extensions/global_shortcut_listener_mac.mm
@@ -39,7 +39,7 @@
@@ -39,7 +39,7 @@ GlobalShortcutListenerMac::GlobalShortcutListenerMac()
// global MediaKeysListener to receive media keys.
if (!content::MediaKeysListenerManager::IsMediaKeysListenerManagerEnabled()) {
media_keys_listener_ = ui::MediaKeysListener::Create(
Expand Down
Expand Up @@ -21,7 +21,7 @@ diff --git a/base/system/sys_info_mac.mm b/base/system/sys_info_mac.mm
index 265d7678060fd003b4f28b2b50f8a80be5253c88..3becbd628e19084de6fd87de4adcdec2c5af67b4 100644
--- a/base/system/sys_info_mac.mm
+++ b/base/system/sys_info_mac.mm
@@ -62,6 +62,19 @@
@@ -62,6 +62,19 @@ void SysInfo::OperatingSystemVersionNumbers(int32_t* major_version,
*major_version = version.majorVersion;
*minor_version = version.minorVersion;
*bugfix_version = version.patchVersion;
Expand Down
6 changes: 3 additions & 3 deletions patches/chromium/mas-cfisobjc.patch
Expand Up @@ -9,15 +9,15 @@ diff --git a/base/mac/foundation_util.mm b/base/mac/foundation_util.mm
index 2a83d4d8158422c1056725679309c6ced1e531bd..f52934712f8de78193127c426d02982b36e9d422 100644
--- a/base/mac/foundation_util.mm
+++ b/base/mac/foundation_util.mm
@@ -27,7 +27,6 @@
@@ -27,7 +27,6 @@ CFTypeID SecKeyGetTypeID();
#if !defined(OS_IOS)
CFTypeID SecACLGetTypeID();
CFTypeID SecTrustedApplicationGetTypeID();
-Boolean _CFIsObjC(CFTypeID typeID, CFTypeRef obj);
#endif
} // extern "C"

@@ -316,8 +315,7 @@ void SetBaseBundleID(const char* new_base_bundle_id) {
@@ -316,8 +315,7 @@ NSFont* CFToNSCast(CTFontRef cf_val) {
const_cast<NSFont*>(reinterpret_cast<const NSFont*>(cf_val));
DCHECK(!cf_val ||
CTFontGetTypeID() == CFGetTypeID(cf_val) ||
Expand All @@ -27,7 +27,7 @@ index 2a83d4d8158422c1056725679309c6ced1e531bd..f52934712f8de78193127c426d02982b
return ns_val;
}

@@ -385,9 +383,6 @@ CTFontRef NSToCFCast(NSFont* ns_val) {
@@ -385,9 +383,6 @@ CFCast<CTFontRef>(const CFTypeRef& cf_val) {
return (CTFontRef)(cf_val);
}

Expand Down
6 changes: 3 additions & 3 deletions patches/chromium/mas_blink_no_private_api.patch
Expand Up @@ -18,7 +18,7 @@ index 94afefcee81b87c05bf9b1199d90d3d4b5ea84a6..2ec7f04c71824b47de1ddbf1f0e8625d
extern "C" {

// Kill ring calls. Would be better to use NSKillRing.h, but that's not
@@ -39,38 +40,53 @@
@@ -39,38 +40,53 @@ NSString* _NSYankFromKillRing();
void _NSNewKillRingSequence();
void _NSSetKillRingToYankedState();
}
Expand Down Expand Up @@ -92,7 +92,7 @@ index 8f4ae94bc1d8188d041654c50511f3346eee79de..fa06f47abbff3dcda937bf0b794f616e

namespace blink {

@@ -95,10 +97,12 @@ void _NSDrawCarbonThemeListBox(NSRect frame,
@@ -95,10 +97,12 @@ bool ThemePainterMac::PaintTextField(const Node* node,
// behavior change while remaining a fragile solution.
// https://bugs.chromium.org/p/chromium/issues/detail?id=658085#c3
if (!use_ns_text_field_cell) {
Expand All @@ -105,7 +105,7 @@ index 8f4ae94bc1d8188d041654c50511f3346eee79de..fa06f47abbff3dcda937bf0b794f616e
return false;
}

@@ -186,10 +190,12 @@ void _NSDrawCarbonThemeListBox(NSRect frame,
@@ -186,10 +190,12 @@ bool ThemePainterMac::PaintTextArea(const Node* node,
const IntRect& r) {
ScopedColorSchemeAppearance appearance(style.UsedColorScheme());
LocalCurrentGraphicsContext local_context(paint_info.context, r);
Expand Down
16 changes: 8 additions & 8 deletions patches/chromium/mas_disable_custom_window_frame.patch
Expand Up @@ -18,7 +18,7 @@ index cf88f696a46ff0ac84bcf466b44d1080438426c1..7672eee30a811001a0149edfa4eed9dc
@interface NSWindow (PrivateBrowserNativeWidgetAPI)
+ (Class)frameViewClassForStyleMask:(NSUInteger)windowStyle;
@end
@@ -63,10 +64,13 @@ - (NSRect)_draggableFrame NS_DEPRECATED_MAC(10_10, 10_11) {
@@ -63,10 +64,13 @@

@end

Expand All @@ -32,7 +32,7 @@ index cf88f696a46ff0ac84bcf466b44d1080438426c1..7672eee30a811001a0149edfa4eed9dc
+ (Class)frameViewClassForStyleMask:(NSUInteger)windowStyle {
// - NSThemeFrame and its subclasses will be nil if it's missing at runtime.
if ([BrowserWindowFrame class])
@@ -81,6 +85,8 @@ - (BOOL)_usesCustomDrawing {
@@ -81,6 +85,8 @@
return NO;
}

Expand All @@ -54,7 +54,7 @@ index 8416c7c6e052dafb2aad61c0bd3224c36e945d23..cd356beda023ab2409b16d58ca38c70b
@interface NSWindow (PrivateAPI)
+ (Class)frameViewClassForStyleMask:(NSUInteger)windowStyle;
@end
@@ -18,8 +20,12 @@ - (CGFloat)_titlebarHeight {
@@ -18,8 +20,12 @@
}
@end

Expand All @@ -67,7 +67,7 @@ index 8416c7c6e052dafb2aad61c0bd3224c36e945d23..cd356beda023ab2409b16d58ca38c70b
+ (Class)frameViewClassForStyleMask:(NSUInteger)windowStyle {
if ([NativeWidgetMacFramelessNSWindowFrame class]) {
return [NativeWidgetMacFramelessNSWindowFrame class];
@@ -27,4 +33,6 @@ + (Class)frameViewClassForStyleMask:(NSUInteger)windowStyle {
@@ -27,4 +33,6 @@
return [super frameViewClassForStyleMask:windowStyle];
}

Expand Down Expand Up @@ -108,7 +108,7 @@ index c10c6633e7bc61cdc3ee41fc018786731177a948..09cc91eaab41e82165d550313579c9e1
- (BOOL)hasKeyAppearance;
- (long long)_resizeDirectionForMouseLocation:(CGPoint)location;
- (BOOL)_isConsideredOpenForPersistentState;
@@ -56,6 +58,8 @@ - (void)cr_mouseDownOnFrameView:(NSEvent*)event {
@@ -56,6 +58,8 @@
}
@end

Expand All @@ -117,7 +117,7 @@ index c10c6633e7bc61cdc3ee41fc018786731177a948..09cc91eaab41e82165d550313579c9e1
@implementation NativeWidgetMacNSWindowTitledFrame
- (void)mouseDown:(NSEvent*)event {
if (self.window.isMovable)
@@ -82,6 +86,8 @@ - (BOOL)usesCustomDrawing {
@@ -82,6 +86,8 @@
}
@end

Expand All @@ -126,7 +126,7 @@ index c10c6633e7bc61cdc3ee41fc018786731177a948..09cc91eaab41e82165d550313579c9e1
@implementation NativeWidgetMacNSWindow {
@private
base::scoped_nsobject<CommandDispatcher> _commandDispatcher;
@@ -163,6 +169,8 @@ - (BOOL)hasViewsMenuActive {
@@ -163,6 +169,8 @@

// NSWindow overrides.

Expand All @@ -135,7 +135,7 @@ index c10c6633e7bc61cdc3ee41fc018786731177a948..09cc91eaab41e82165d550313579c9e1
+ (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle {
if (windowStyle & NSWindowStyleMaskTitled) {
if (Class customFrame = [NativeWidgetMacNSWindowTitledFrame class])
@@ -174,6 +182,8 @@ + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle {
@@ -174,6 +182,8 @@
return [super frameViewClassForStyleMask:windowStyle];
}

Expand Down
26 changes: 13 additions & 13 deletions patches/chromium/mas_disable_remote_accessibility.patch
Expand Up @@ -17,15 +17,15 @@ diff --git a/components/remote_cocoa/app_shim/application_bridge.mm b/components
index 9ddda9116e7284cbccde8a51e23ad7560dd06367..e846091ad99b0154636489e53491209ff3cbfaaa 100644
--- a/components/remote_cocoa/app_shim/application_bridge.mm
+++ b/components/remote_cocoa/app_shim/application_bridge.mm
@@ -49,6 +49,7 @@
@@ -49,6 +49,7 @@ class NativeWidgetBridgeOwner : public NativeWidgetNSWindowHostHelper {

// NativeWidgetNSWindowHostHelper:
id GetNativeViewAccessible() override {
+#ifndef MAS_BUILD
if (!remote_accessibility_element_) {
int64_t browser_pid = 0;
std::vector<uint8_t> element_token;
@@ -59,6 +60,9 @@ id GetNativeViewAccessible() override {
@@ -59,6 +60,9 @@ class NativeWidgetBridgeOwner : public NativeWidgetNSWindowHostHelper {
ui::RemoteAccessibility::GetRemoteElementFromToken(element_token);
}
return remote_accessibility_element_.get();
Expand All @@ -35,7 +35,7 @@ index 9ddda9116e7284cbccde8a51e23ad7560dd06367..e846091ad99b0154636489e53491209f
}
void DispatchKeyEvent(ui::KeyEvent* event) override {
bool event_handled = false;
@@ -96,8 +100,10 @@ void GetWordAt(const gfx::Point& location_in_content,
@@ -96,8 +100,10 @@ class NativeWidgetBridgeOwner : public NativeWidgetNSWindowHostHelper {
mojo::AssociatedRemote<mojom::TextInputHost> text_input_host_remote_;

std::unique_ptr<NativeWidgetNSWindowBridge> bridge_;
Expand All @@ -50,7 +50,7 @@ diff --git a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
index 2ee45cb069ec5d78d9c7a3f61fdd1d444a590f41..badc4323b910f8e3957583e05af303472cb204f6 100644
--- a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
+++ b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
@@ -543,10 +543,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) {
@@ -543,10 +543,12 @@ void NativeWidgetNSWindowBridge::CreateContentView(uint64_t ns_view_id,
// this should be treated as an error and caught early.
CHECK(bridged_view_);

Expand All @@ -67,7 +67,7 @@ diff --git a/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm b/cont
index a8e5c8888cb7ea8a85de7c8e8c613cc2b3c5be15..d01468fe77703b2812865b0198b84b0b645283c4 100644
--- a/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm
+++ b/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm
@@ -66,8 +66,10 @@ id GetFocusedBrowserAccessibilityElement() override {
@@ -66,8 +66,10 @@ class RenderWidgetHostNSViewBridgeOwner
return nil;
}
void SetAccessibilityWindow(NSWindow* window) override {
Expand All @@ -78,7 +78,7 @@ index a8e5c8888cb7ea8a85de7c8e8c613cc2b3c5be15..d01468fe77703b2812865b0198b84b0b
}

void ForwardKeyboardEvent(const content::NativeWebKeyboardEvent& key_event,
@@ -126,8 +128,10 @@ void SmartMagnify(const blink::WebGestureEvent& web_event) override {
@@ -126,8 +128,10 @@ class RenderWidgetHostNSViewBridgeOwner

mojo::AssociatedRemote<mojom::RenderWidgetHostNSViewHost> host_;
std::unique_ptr<RenderWidgetHostNSViewBridge> bridge_;
Expand Down Expand Up @@ -120,7 +120,7 @@ diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/cont
index 6c8313f7e09be253528ca83727b78152a17229c8..f293a15c6145422707c22aeb5a254ad71a31900c 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -231,8 +231,10 @@
@@ -231,8 +231,10 @@ RenderWidgetHostViewMac::~RenderWidgetHostViewMac() {
void RenderWidgetHostViewMac::MigrateNSViewBridge(
remote_cocoa::mojom::Application* remote_cocoa_application,
uint64_t parent_ns_view_id) {
Expand All @@ -131,7 +131,7 @@ index 6c8313f7e09be253528ca83727b78152a17229c8..f293a15c6145422707c22aeb5a254ad7

// Disconnect from the previous bridge (this will have the effect of
// destroying the associated bridge), and close the receiver (to allow it
@@ -1348,8 +1350,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
@@ -1348,8 +1350,10 @@ RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessible() {

gfx::NativeViewAccessible
RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessibleForWindow() {
Expand All @@ -142,7 +142,7 @@ index 6c8313f7e09be253528ca83727b78152a17229c8..f293a15c6145422707c22aeb5a254ad7
return [GetInProcessNSView() window];
}

@@ -1381,9 +1385,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
@@ -1381,9 +1385,11 @@ id RenderWidgetHostViewMac::GetFocusedBrowserAccessibilityElement() {
}

void RenderWidgetHostViewMac::SetAccessibilityWindow(NSWindow* window) {
Expand All @@ -154,7 +154,7 @@ index 6c8313f7e09be253528ca83727b78152a17229c8..f293a15c6145422707c22aeb5a254ad7
}

bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame(
@@ -1870,12 +1876,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
@@ -1870,12 +1876,14 @@ void RenderWidgetHostViewMac::StopSpeaking() {

void RenderWidgetHostViewMac::SetRemoteAccessibilityWindowToken(
const std::vector<uint8_t>& window_token) {
Expand Down Expand Up @@ -239,7 +239,7 @@ diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.mm b/ui/views/cocoa
index 2256c365af5b1af79458fdcb0cb9d44c9ff641fd..f4949b071a177452b0074a2436669e9846558d1a 100644
--- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm
+++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm
@@ -282,14 +282,22 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
@@ -282,14 +282,22 @@ gfx::NativeViewAccessible
NativeWidgetMacNSWindowHost::GetNativeViewAccessibleForNSView() const {
if (in_process_ns_window_bridge_)
return in_process_ns_window_bridge_->ns_view();
Expand All @@ -262,15 +262,15 @@ index 2256c365af5b1af79458fdcb0cb9d44c9ff641fd..f4949b071a177452b0074a2436669e98
}

remote_cocoa::mojom::NativeWidgetNSWindow*
@@ -1118,6 +1126,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
@@ -1118,6 +1126,7 @@ void NativeWidgetMacNSWindowHost::OnFocusWindowToolbar() {
void NativeWidgetMacNSWindowHost::SetRemoteAccessibilityTokens(
const std::vector<uint8_t>& window_token,
const std::vector<uint8_t>& view_token) {
+#ifndef MAS_BUILD
remote_window_accessible_ =
ui::RemoteAccessibility::GetRemoteElementFromToken(window_token);
remote_view_accessible_ =
@@ -1125,14 +1134,17 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
@@ -1125,14 +1134,17 @@ void NativeWidgetMacNSWindowHost::SetRemoteAccessibilityTokens(
[remote_view_accessible_ setWindowUIElement:remote_window_accessible_.get()];
[remote_view_accessible_
setTopLevelUIElement:remote_window_accessible_.get()];
Expand Down
10 changes: 5 additions & 5 deletions patches/chromium/mas_disable_remote_layer.patch
Expand Up @@ -44,23 +44,23 @@ diff --git a/gpu/ipc/service/image_transport_surface_overlay_mac.mm b/gpu/ipc/se
index eb46993b8f40fdc7da35dae1b850dad637f6b47d..05a9ae47620d17b5a53f991c0b3a0a5c153b599c 100644
--- a/gpu/ipc/service/image_transport_surface_overlay_mac.mm
+++ b/gpu/ipc/service/image_transport_surface_overlay_mac.mm
@@ -63,6 +63,7 @@
@@ -63,6 +63,7 @@ ImageTransportSurfaceOverlayMacBase<
template <typename BaseClass>
bool ImageTransportSurfaceOverlayMacBase<BaseClass>::Initialize(
gl::GLSurfaceFormat format) {
+#ifndef MAS_BUILD
// Create the CAContext to send this to the GPU process, and the layer for
// the context.
if (use_remote_layer_api_) {
@@ -71,6 +72,7 @@
@@ -71,6 +72,7 @@ bool ImageTransportSurfaceOverlayMacBase<BaseClass>::Initialize(
[CAContext contextWithCGSConnection:connection_id options:@{}] retain]);
[ca_context_ setLayer:ca_layer_tree_coordinator_->GetCALayerForDisplay()];
}
+#endif
return true;
}

@@ -139,7 +141,9 @@
@@ -139,7 +141,9 @@ ImageTransportSurfaceOverlayMacBase<BaseClass>::SwapBuffersInternal(
"GLImpl", static_cast<int>(gl::GetGLImplementation()),
"width", pixel_size_.width());
if (use_remote_layer_api_) {
Expand All @@ -74,15 +74,15 @@ diff --git a/ui/accelerated_widget_mac/display_ca_layer_tree.mm b/ui/accelerated
index 38f25d6314f653d7138d30c67c5ae49963863327..f2fda251ed975bd848a49b33830d329fc8954826 100644
--- a/ui/accelerated_widget_mac/display_ca_layer_tree.mm
+++ b/ui/accelerated_widget_mac/display_ca_layer_tree.mm
@@ -97,6 +97,7 @@ - (void)setContentsChanged;
@@ -97,6 +97,7 @@ void DisplayCALayerTree::UpdateCALayerTree(
}

void DisplayCALayerTree::GotCALayerFrame(uint32_t ca_context_id) {
+#ifndef MAS_BUILD
// Early-out if the remote layer has not changed.
if ([remote_layer_ contextId] == ca_context_id)
return;
@@ -121,6 +122,9 @@ - (void)setContentsChanged;
@@ -121,6 +122,9 @@ void DisplayCALayerTree::GotCALayerFrame(uint32_t ca_context_id) {
[io_surface_layer_ removeFromSuperlayer];
io_surface_layer_.reset();
}
Expand Down

0 comments on commit 130af11

Please sign in to comment.