Skip to content

Commit

Permalink
chore: update patches
Browse files Browse the repository at this point in the history
  • Loading branch information
MarshallOfSound committed Jun 7, 2022
1 parent c3eaabc commit 7375148
Show file tree
Hide file tree
Showing 9 changed files with 62 additions and 64 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ index b6234183651923505bd2a4a8640ea21508033ef1..e486f92e909f43bb65633245b7dcb314
"//base",
"//build:branding_buildflags",
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index 202be29859788c1418d598b7e7e6887c14bb489d..2c3fbd3858b5ed9f613b7a9f55b0b7c6bc174e0c 100644
index cfac7fd1aef326aa8ff0a9bb0de7160431240fe0..b1eade39fba103fcf7f6b0d10bfae61ce36d92e9 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -4543,7 +4543,7 @@ static_library("browser") {
@@ -4544,7 +4544,7 @@ static_library("browser") {

# On Windows, the hashes are embedded in //chrome:chrome_initial rather
# than here in :chrome_dll.
Expand All @@ -46,7 +46,7 @@ index 202be29859788c1418d598b7e7e6887c14bb489d..2c3fbd3858b5ed9f613b7a9f55b0b7c6
sources += [ "certificate_viewer_stub.cc" ]
}
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
index e4324f70a44a95f6dcf344b37b6fba49f15e3050..1bafdb39b88e99965f0e1596b32c9aeffa8a7f66 100644
index a8a28312f3e3e50491021dbead11e18c2f441b97..3d528b5529132160a42735e6df4a5d355d566d9c 100644
--- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn
@@ -5901,7 +5901,6 @@ test("unit_tests") {
Expand Down Expand Up @@ -76,7 +76,7 @@ index e4324f70a44a95f6dcf344b37b6fba49f15e3050..1bafdb39b88e99965f0e1596b32c9aef
"//chrome/browser:cart_db_content_proto",
"//chrome/browser:coupon_db_content_proto",
"//chrome/browser/media/router:test_support",
@@ -6925,6 +6927,10 @@ test("unit_tests") {
@@ -6926,6 +6928,10 @@ test("unit_tests") {
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ index f0333177f885000fb22818ffa30a0c4ad520a161..03e82957f9d7bf009dcbf5fcd43718c9
content::WebContents* source,
const content::OpenURLParams& params) override;
diff --git a/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc b/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc
index caa6c2dbc6dbf87081da9a2e5c42e9ac2e60c77f..ac0b7dbee8195be8c165444a141629475e97a107 100644
index 1318d5e04d5448d2b357454c3ce4207264288760..3b0324c35d5b18ed2e29264aae860c4887cdd382 100644
--- a/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc
+++ b/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc
@@ -71,8 +71,7 @@ class ChromeKeyboardContentsDelegate : public content::WebContentsDelegate,
Expand All @@ -108,10 +108,10 @@ index caa6c2dbc6dbf87081da9a2e5c42e9ac2e60c77f..ac0b7dbee8195be8c165444a14162947
}

diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index b3338d65a44b337ad3762b4f5cd0e8178e2ddc2a..51d41557b26dfa99b2306b2eb6b93251188376ef 100644
index 63d64acc7231821219a7bcd89ee02590637d4b79..007689d1cb803704dc91bd152351ccfc11bd55b7 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -1799,12 +1799,11 @@ bool Browser::IsWebContentsCreationOverridden(
@@ -1801,12 +1801,11 @@ bool Browser::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
Expand Down
6 changes: 3 additions & 3 deletions patches/chromium/disable_color_correct_rendering.patch
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ to deal with color spaces. That is being tracked at
https://crbug.com/634542 and https://crbug.com/711107.

diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index eef870d311cbdead96be496414240b0fcfa93aba..fcdaa98fd6588aa93f460e1a12b8801aeecaa6e2 100644
index cde4cfa495fe1a28d36af2d98bd60fdd5777920e..9c8ad29f2aae9974c678d334bdaae64396a20f63 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -1848,6 +1848,9 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw(
Expand All @@ -34,7 +34,7 @@ index eef870d311cbdead96be496414240b0fcfa93aba..fcdaa98fd6588aa93f460e1a12b8801a
// If we are likely to software composite the resource, we use sRGB because
// software compositing is unable to perform color conversion.
diff --git a/cc/trees/layer_tree_settings.h b/cc/trees/layer_tree_settings.h
index 14a2e02d9a6edc3a7002ca43bc82c8ef98eb32b5..10abba0f0610719cc4be0ce792ce64aba43bbe04 100644
index 8dfe968b6314f5f5f350b3df6819043668293fd6..2f3a8a335d130c3be58b87bccdb95bd66ae37091 100644
--- a/cc/trees/layer_tree_settings.h
+++ b/cc/trees/layer_tree_settings.h
@@ -93,6 +93,8 @@ class CC_EXPORT LayerTreeSettings {
Expand Down Expand Up @@ -144,7 +144,7 @@ index 75d7af9a79d4e7f2cd39e45496ab5fff66407638..b4ddafdd126edd16172f00448bbbd56e
}

diff --git a/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc b/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc
index a45ff42324833d805f21d9b6ccbf27f17a510bba..573a99cdd64eab3fb1035f89f517bd14c99212a8 100644
index bd070fbfc7f3abcef7c0d89a608fc52c31cf3be3..8f16aaa064c2455d02c7d8e1ff09364fdedcd0fa 100644
--- a/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc
+++ b/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc
@@ -24,6 +24,7 @@
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,26 +108,25 @@ index 2e9453c18f2f6623d31b477aa856152ddacc3e23..93b6080135c08bc9d4cf7020f4fcb15c

} // namespace viz
diff --git a/components/viz/service/display_embedder/output_surface_provider_impl.cc b/components/viz/service/display_embedder/output_surface_provider_impl.cc
index 555b911352277820d9d58ca35eace175748e12bd..6e54db0452f6bcb324a03aa7b9a7659e235ddcd0 100644
index 8585790795707cbe06ebe9c6cc87fb6da0a4a88b..dade8473dc350ebbc0246b30615a83fc22f735fd 100644
--- a/components/viz/service/display_embedder/output_surface_provider_impl.cc
+++ b/components/viz/service/display_embedder/output_surface_provider_impl.cc
@@ -23,6 +23,7 @@
@@ -23,12 +23,14 @@
#include "components/viz/service/display_embedder/server_shared_bitmap_manager.h"
#include "components/viz/service/display_embedder/skia_output_surface_dependency_impl.h"
#include "components/viz/service/display_embedder/skia_output_surface_impl.h"
+#include "components/viz/service/display_embedder/software_output_device_proxy.h"
#include "components/viz/service/display_embedder/software_output_surface.h"
#include "components/viz/service/gl/gpu_service_impl.h"
#include "gpu/command_buffer/client/gpu_memory_buffer_manager.h"
@@ -35,6 +36,7 @@
#include "gpu/command_buffer/client/shared_memory_limits.h"
#include "gpu/config/gpu_finch_features.h"
#include "gpu/ipc/common/surface_handle.h"
#include "gpu/ipc/scheduler_sequence.h"
#include "gpu/ipc/service/gpu_channel_manager_delegate.h"
#include "gpu/ipc/service/image_transport_surface.h"
+#include "services/viz/privileged/mojom/compositing/layered_window_updater.mojom.h"
#include "ui/base/ui_base_switches.h"

#if BUILDFLAG(IS_WIN)
@@ -107,7 +109,8 @@ std::unique_ptr<OutputSurface> OutputSurfaceProviderImpl::CreateOutputSurface(
@@ -89,7 +91,8 @@ std::unique_ptr<OutputSurface> OutputSurfaceProviderImpl::CreateOutputSurface(
mojom::DisplayClient* display_client,
DisplayCompositorMemoryAndTaskController* gpu_dependency,
const RendererSettings& renderer_settings,
Expand All @@ -137,7 +136,7 @@ index 555b911352277820d9d58ca35eace175748e12bd..6e54db0452f6bcb324a03aa7b9a7659e
#if BUILDFLAG(IS_CHROMEOS_ASH)
if (surface_handle == gpu::kNullSurfaceHandle)
return std::make_unique<OutputSurfaceUnified>();
@@ -119,7 +122,7 @@ std::unique_ptr<OutputSurface> OutputSurfaceProviderImpl::CreateOutputSurface(
@@ -101,7 +104,7 @@ std::unique_ptr<OutputSurface> OutputSurfaceProviderImpl::CreateOutputSurface(

if (!gpu_compositing) {
output_surface = std::make_unique<SoftwareOutputSurface>(
Expand All @@ -146,7 +145,7 @@ index 555b911352277820d9d58ca35eace175748e12bd..6e54db0452f6bcb324a03aa7b9a7659e
} else {
DCHECK(gpu_dependency);
{
@@ -156,10 +159,22 @@ std::unique_ptr<OutputSurface> OutputSurfaceProviderImpl::CreateOutputSurface(
@@ -138,10 +141,22 @@ std::unique_ptr<OutputSurface> OutputSurfaceProviderImpl::CreateOutputSurface(
std::unique_ptr<SoftwareOutputDevice>
OutputSurfaceProviderImpl::CreateSoftwareOutputDeviceForPlatform(
gpu::SurfaceHandle surface_handle,
Expand All @@ -171,10 +170,10 @@ index 555b911352277820d9d58ca35eace175748e12bd..6e54db0452f6bcb324a03aa7b9a7659e
return CreateSoftwareOutputDeviceWin(surface_handle, &output_device_backing_,
display_client);
diff --git a/components/viz/service/display_embedder/output_surface_provider_impl.h b/components/viz/service/display_embedder/output_surface_provider_impl.h
index 0dd6a4debc0587199acd2626e3decf4a6651e7a9..04d78d0c015c5eede01dec759a16d56dca4c19ae 100644
index be10797e6f517ae069b8bc579155440d8a110362..fb6848b70a80c9c6cda42605a8b86ffbeb2a5ec8 100644
--- a/components/viz/service/display_embedder/output_surface_provider_impl.h
+++ b/components/viz/service/display_embedder/output_surface_provider_impl.h
@@ -65,12 +65,14 @@ class VIZ_SERVICE_EXPORT OutputSurfaceProviderImpl
@@ -49,12 +49,14 @@ class VIZ_SERVICE_EXPORT OutputSurfaceProviderImpl
mojom::DisplayClient* display_client,
DisplayCompositorMemoryAndTaskController* gpu_dependency,
const RendererSettings& renderer_settings,
Expand All @@ -190,7 +189,7 @@ index 0dd6a4debc0587199acd2626e3decf4a6651e7a9..04d78d0c015c5eede01dec759a16d56d
+ bool offscreen);

const raw_ptr<GpuServiceImpl> gpu_service_impl_;
const raw_ptr<gpu::CommandBufferTaskExecutor> task_executor_;

diff --git a/components/viz/service/display_embedder/software_output_device_mac.cc b/components/viz/service/display_embedder/software_output_device_mac.cc
index 33e12349a951ef533b964d1158f8fa124623e946..fc04bcaffefc277dd1d0cdd766168de017fedca8 100644
--- a/components/viz/service/display_embedder/software_output_device_mac.cc
Expand Down
4 changes: 2 additions & 2 deletions patches/chromium/frame_host_manager.patch
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Subject: frame_host_manager.patch
Allows embedder to intercept site instances created by chromium.

diff --git a/content/browser/renderer_host/render_frame_host_manager.cc b/content/browser/renderer_host/render_frame_host_manager.cc
index dd1e91e5d3f7cffafaf14116bd33aef2ce1aaa1f..b7fdd58a21a863bb5eb777be935217559ca5b795 100644
index 398358851f4ec3d1373091c352fe864b8901f08b..0fadcf6eb5aa9e7e6ca32ec252f1722ab87b6be9 100644
--- a/content/browser/renderer_host/render_frame_host_manager.cc
+++ b/content/browser/renderer_host/render_frame_host_manager.cc
@@ -3217,6 +3217,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
@@ -3203,6 +3203,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
request->ResetStateForSiteInstanceChange();
}

Expand Down
14 changes: 7 additions & 7 deletions patches/chromium/mas_disable_custom_window_frame.patch
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ index 67ebc56bd7ee267c03a5543e10a6a41042fcaa38..af3ed27dea51c22ab32ce14686dd7807
// The NSWindow used by BridgedNativeWidget. Provides hooks into AppKit that
// can only be accomplished by overriding methods.
diff --git a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm
index 773158df97f36f69d2226c9ae748aa5eaade0c0b..ee17b53daf9e9c5b53f42704efbb565aeb8bfb01 100644
index 48c86f5aa9578545f43b04b520e9f1dd92d224c5..fc57c47fe6afaabf363c9efdf75f60e866244fdb 100644
--- a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm
+++ b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm
@@ -16,7 +16,9 @@
#import "ui/base/cocoa/window_size_constants.h"
@@ -77,7 +77,9 @@ void OrderChildWindow(NSWindow* child_window,
} // namespace

@interface NSWindow (Private)
+#ifndef MAS_BUILD
Expand All @@ -108,7 +108,7 @@ index 773158df97f36f69d2226c9ae748aa5eaade0c0b..ee17b53daf9e9c5b53f42704efbb565a
- (BOOL)hasKeyAppearance;
- (long long)_resizeDirectionForMouseLocation:(CGPoint)location;
- (BOOL)_isConsideredOpenForPersistentState;
@@ -48,6 +50,8 @@ - (void)cr_mouseDownOnFrameView:(NSEvent*)event {
@@ -109,6 +111,8 @@ - (void)cr_mouseDownOnFrameView:(NSEvent*)event {
}
@end

Expand All @@ -117,7 +117,7 @@ index 773158df97f36f69d2226c9ae748aa5eaade0c0b..ee17b53daf9e9c5b53f42704efbb565a
@implementation NativeWidgetMacNSWindowTitledFrame
- (void)mouseDown:(NSEvent*)event {
if (self.window.isMovable)
@@ -74,6 +78,8 @@ - (BOOL)usesCustomDrawing {
@@ -135,6 +139,8 @@ - (BOOL)usesCustomDrawing {
}
@end

Expand All @@ -126,7 +126,7 @@ index 773158df97f36f69d2226c9ae748aa5eaade0c0b..ee17b53daf9e9c5b53f42704efbb565a
@implementation NativeWidgetMacNSWindow {
@private
base::scoped_nsobject<CommandDispatcher> _commandDispatcher;
@@ -209,6 +215,8 @@ - (BOOL)hasViewsMenuActive {
@@ -281,6 +287,8 @@ - (BOOL)hasViewsMenuActive {

// NSWindow overrides.

Expand All @@ -135,7 +135,7 @@ index 773158df97f36f69d2226c9ae748aa5eaade0c0b..ee17b53daf9e9c5b53f42704efbb565a
+ (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle {
if (windowStyle & NSWindowStyleMaskTitled) {
if (Class customFrame = [NativeWidgetMacNSWindowTitledFrame class])
@@ -220,6 +228,8 @@ + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle {
@@ -292,6 +300,8 @@ + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle {
return [super frameViewClassForStyleMask:windowStyle];
}

Expand Down
2 changes: 1 addition & 1 deletion patches/chromium/mas_disable_remote_accessibility.patch
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ index 306db835fe203f663b1d84dd3490b619eb3f60b2..7a41d7afe6197e0a78934206782b1063

} // namespace
diff --git a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
index f313f0b3f5f0e49735ec8b1f889638c6a6b67972..a10e294e67fb963a8e66d93013028616328b5fe2 100644
index aa6a1a667af13a76ef299681367b31a8668d7425..949fdc533703862d02a19f08dcd26a56e7845d4a 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
@@ -580,10 +580,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) {
Expand Down
24 changes: 12 additions & 12 deletions patches/chromium/mas_disable_remote_layer.patch
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ cases where performance improves when disabling remote CoreAnimation (remote
CoreAnimation is really only about battery usage).

diff --git a/gpu/ipc/service/image_transport_surface_overlay_mac.h b/gpu/ipc/service/image_transport_surface_overlay_mac.h
index 7fc76ecb3292a892e2aa8c117cd6302f9ce63fa6..efd5da9daf8fbe80264b8b55eafc717317ba48e6 100644
index 506ff3c2b9a14a725d13e3933bc281d05c0b6b13..9726e2d34d6d123ad3e62d843d21b755788fc062 100644
--- a/gpu/ipc/service/image_transport_surface_overlay_mac.h
+++ b/gpu/ipc/service/image_transport_surface_overlay_mac.h
@@ -21,7 +21,9 @@
Expand All @@ -29,7 +29,7 @@ index 7fc76ecb3292a892e2aa8c117cd6302f9ce63fa6..efd5da9daf8fbe80264b8b55eafc7173
@class CALayer;

namespace ui {
@@ -115,7 +117,9 @@ class ImageTransportSurfaceOverlayMac : public gl::GLSurface,
@@ -113,7 +115,9 @@ class ImageTransportSurfaceOverlayMac : public gl::GLSurface,
base::WeakPtr<ImageTransportSurfaceDelegate> delegate_;

bool use_remote_layer_api_;
Expand All @@ -39,7 +39,7 @@ index 7fc76ecb3292a892e2aa8c117cd6302f9ce63fa6..efd5da9daf8fbe80264b8b55eafc7173
std::unique_ptr<ui::CALayerTreeCoordinator> ca_layer_tree_coordinator_;

gfx::Size pixel_size_;
@@ -210,7 +214,9 @@ class ImageTransportSurfaceOverlayMacEGL : public gl::GLSurfaceEGL,
@@ -204,7 +208,9 @@ class ImageTransportSurfaceOverlayMacEGL : public gl::GLSurfaceEGL,
base::WeakPtr<ImageTransportSurfaceDelegate> delegate_;

bool use_remote_layer_api_;
Expand All @@ -50,57 +50,57 @@ index 7fc76ecb3292a892e2aa8c117cd6302f9ce63fa6..efd5da9daf8fbe80264b8b55eafc7173

gfx::Size pixel_size_;
diff --git a/gpu/ipc/service/image_transport_surface_overlay_mac.mm b/gpu/ipc/service/image_transport_surface_overlay_mac.mm
index 43be379adb3df7dc31e59319c921cd89654db57a..bc495df301751628117356c8e68b5d121828ce85 100644
index 3378b9a6d411b853fe64e02812c329f68cbbd2ad..7b2f0b3dc28ff71ae84fe63aa9ea80c2aab75969 100644
--- a/gpu/ipc/service/image_transport_surface_overlay_mac.mm
+++ b/gpu/ipc/service/image_transport_surface_overlay_mac.mm
@@ -59,6 +59,7 @@
@@ -60,6 +60,7 @@
ca_layer_tree_coordinator_ = std::make_unique<ui::CALayerTreeCoordinator>(
use_remote_layer_api_, allow_av_sample_buffer_display_layer);

+#ifndef MAS_BUILD
// Create the CAContext to send this to the GPU process, and the layer for
// the context.
if (use_remote_layer_api_) {
@@ -67,6 +68,7 @@
@@ -68,6 +69,7 @@
options:@{}] retain]);
[ca_context_ setLayer:ca_layer_tree_coordinator_->GetCALayerForDisplay()];
}
+#endif
}

ImageTransportSurfaceOverlayMac::~ImageTransportSurfaceOverlayMac() {
@@ -146,7 +148,9 @@
@@ -145,7 +147,9 @@
"GLImpl", static_cast<int>(gl::GetGLImplementation()),
"width", pixel_size_.width());
if (use_remote_layer_api_) {
+#ifndef MAS_BUILD
params.ca_layer_params.ca_context_id = [ca_context_ contextId];
params.ca_context_id = [ca_context_ contextId];
+#endif
} else {
IOSurfaceRef io_surface =
ca_layer_tree_coordinator_->GetIOSurfaceForDisplay();
@@ -408,6 +412,7 @@
@@ -378,6 +382,7 @@
ca_layer_tree_coordinator_ = std::make_unique<ui::CALayerTreeCoordinator>(
use_remote_layer_api_, allow_av_sample_buffer_display_layer);

+#ifndef MAS_BUILD
// Create the CAContext to send this to the GPU process, and the layer for
// the context.
if (use_remote_layer_api_) {
@@ -416,6 +421,7 @@
@@ -386,6 +391,7 @@
options:@{}] retain]);
[ca_context_ setLayer:ca_layer_tree_coordinator_->GetCALayerForDisplay()];
}
+#endif
}

ImageTransportSurfaceOverlayMacEGL::~ImageTransportSurfaceOverlayMacEGL() {
@@ -496,7 +502,9 @@
@@ -464,7 +470,9 @@
"GLImpl", static_cast<int>(gl::GetGLImplementation()),
"width", pixel_size_.width());
if (use_remote_layer_api_) {
+#ifndef MAS_BUILD
params.ca_layer_params.ca_context_id = [ca_context_ contextId];
params.ca_context_id = [ca_context_ contextId];
+#endif
} else {
IOSurfaceRef io_surface =
Expand Down

0 comments on commit 7375148

Please sign in to comment.