Hello community,
here is the log from the commit of package chromium.12662 for
openSUSE:Leap:15.1:Update checked in at 2020-06-17 18:18:03
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.1:Update/chromium.12662 (Old)
and /work/SRC/openSUSE:Leap:15.1:Update/.chromium.12662.new.3606 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "chromium.12662"
Wed Jun 17 18:18:03 2020 rev:1 rq:814855 version:83.0.4103.97
Changes:
--------
New Changes file:
--- /dev/null 2020-05-28 02:28:09.919761697 +0200
+++
/work/SRC/openSUSE:Leap:15.1:Update/.chromium.12662.new.3606/chromium.changes
2020-06-17 18:18:38.532618122 +0200
@@ -0,0 +1,5625 @@
+-------------------------------------------------------------------
+Mon Jun 15 14:05:36 UTC 2020 - Tomáš Chvátal <[email protected]>
+
+- Another attempt on the location handling for Leap 15.1:
+ * no-location-leap151.patch
+
+-------------------------------------------------------------------
+Thu Jun 11 16:31:50 UTC 2020 - Tomáš Chvátal <[email protected]>
+
+- Attempt to build with wayland/ozone enabled
+
+-------------------------------------------------------------------
+Thu Jun 11 12:14:32 UTC 2020 - Tomáš Chvátal <[email protected]>
+
+- Enable more system libs on 15.2+
+- Remove the chromium-83-gcc-location-revert.patch as it is wrong
+ approach to fix the problem
+
+-------------------------------------------------------------------
+Thu Jun 11 09:05:00 UTC 2020 - Tomáš Chvátal <[email protected]>
+
+- Update _constraints to match up LTO enablement
+
+-------------------------------------------------------------------
+Wed Jun 10 12:20:57 UTC 2020 - Tomáš Chvátal <[email protected]>
+
+- With GCC 10 released we should be able to enable LTO again
+
+-------------------------------------------------------------------
+Thu Jun 4 06:28:45 UTC 2020 - Tomáš Chvátal <[email protected]>
+
+- Update to 83.0.4103.97 bsc#1172496:
+ * CVE-2020-6493: Use after free in WebAuthentication.
+ * CVE-2020-6494: Incorrect security UI in payments.
+ * CVE-2020-6495: Insufficient policy enforcement in developer tools.
+ * CVE-2020-6496: Use after free in payments.
+
+-------------------------------------------------------------------
+Thu May 28 09:18:05 UTC 2020 - Tomáš Chvátal <[email protected]>
+
+- Add patch to not use bundled unrar:
+ * chromium-norar.patch
+
+-------------------------------------------------------------------
+Thu May 28 08:59:02 UTC 2020 - Fabian Vogt <[email protected]>
+
+- Amend chromium-prop-codecs.patch to allow proprietary_codecs
+ without building third_party/openh264
+
+-------------------------------------------------------------------
+Wed May 27 12:03:31 UTC 2020 - Tomáš Chvátal <[email protected]>
+
+- Add revert of location setting commit that broke build on
+ openSUSE Leap 15.1:
+ * chromium-83-gcc-location-revert.patch
+
+-------------------------------------------------------------------
+Mon May 25 09:16:54 UTC 2020 - Tomáš Chvátal <[email protected]>
+
+- Swtich to GCC 9.x on Leaps to avoid gcc bug exposed in gcc8
+
+-------------------------------------------------------------------
+Fri May 22 09:44:37 UTC 2020 - Tomáš Chvátal <[email protected]>
+
+- Add patch to fix building with new re2:
+ * chromium-81-re2-0.2020.05.01.patch
+
+-------------------------------------------------------------------
+Wed May 20 16:35:28 UTC 2020 - Guillaume GARDET <[email protected]>
+
+- Update _constraints to avoid very slow builds seen on obs-arm-4
+ (probably due to swap)
+
+-------------------------------------------------------------------
+Wed May 20 09:35:32 UTC 2020 - Tomáš Chvátal <[email protected]>
+
+- Update to 83.0.4103.61 bsc#1171910:
+ * CVE-2020-6465: Use after free in reader mode. Reported by Woojin
Oh(@pwn_expoit) of STEALIEN on 2020-04-21
+ * CVE-2020-6466: Use after free in media. Reported by Zhe Jin from cdsrc of
Qihoo 360 on 2020-04-26
+ * CVE-2020-6467: Use after free in WebRTC. Reported by ZhanJia Song on
2020-04-06
+ * CVE-2020-6468: Type Confusion in V8. Reported by Chris Salls and Jake
Corina of Seaside Security, Chani Jindal of Shellphish on 2020-04-30
+ * CVE-2020-6469: Insufficient policy enforcement in developer tools.
Reported by David Erceg on 2020-04-02
+ * CVE-2020-6470: Insufficient validation of untrusted input in clipboard.
Reported by Michał Bentkowski of Securitum on 2020-03-30
+ * CVE-2020-6471: Insufficient policy enforcement in developer tools.
Reported by David Erceg on 2020-03-08
+ * CVE-2020-6472: Insufficient policy enforcement in developer tools.
Reported by David Erceg on 2020-03-25
+ * CVE-2020-6473: Insufficient policy enforcement in Blink. Reported by
Soroush Karami and Panagiotis Ilia on 2020-02-06
+ * CVE-2020-6474: Use after free in Blink. Reported by Zhe Jin from cdsrc of
Qihoo 360 on 2020-03-07
+ * CVE-2020-6475: Incorrect security UI in full screen. Reported by Khalil
Zhani on 2019-10-31
+ * CVE-2020-6476: Insufficient policy enforcement in tab strip. Reported by
Alexandre Le Borgne on 2019-12-18
+ * CVE-2020-6477: Inappropriate implementation in installer. Reported by
RACK911 Labs on 2019-03-26
+ * CVE-2020-6478: Inappropriate implementation in full screen. Reported by
Khalil Zhani on 2019-12-24
+ * CVE-2020-6479: Inappropriate implementation in sharing. Reported by Zhong
Zhaochen of andsecurity.cn on 2020-01-14
+ * CVE-2020-6480: Insufficient policy enforcement in enterprise. Reported by
Marvin Witt on 2020-02-21
+ * CVE-2020-6481: Insufficient policy enforcement in URL formatting. Reported
by Rayyan Bijoora on 2020-04-07
+ * CVE-2020-6482: Insufficient policy enforcement in developer tools.
Reported by Abdulrahman Alqabandi (@qab) on 2017-12-17
+ * CVE-2020-6483: Insufficient policy enforcement in payments. Reported by
Jun Kokatsu, Microsoft Browser Vulnerability Research on 2019-05-23
+ * CVE-2020-6484: Insufficient data validation in ChromeDriver. Reported by
Artem Zinenko on 2020-01-26
+ * CVE-2020-6485: Insufficient data validation in media router. Reported by
Sergei Glazunov of Google Project Zero on 2020-01-30
+ * CVE-2020-6486: Insufficient policy enforcement in navigations. Reported by
David Erceg on 2020-02-24
+ * CVE-2020-6487: Insufficient policy enforcement in downloads. Reported by
Jun Kokatsu (@shhnjk) on 2015-10-06
+ * CVE-2020-6488: Insufficient policy enforcement in downloads. Reported by
David Erceg on 2020-01-21
+ * CVE-2020-6489: Inappropriate implementation in developer tools. Reported
by @lovasoa (Ophir LOJKINE) on 2020-02-10
+ * CVE-2020-6490: Insufficient data validation in loader. Reported by Twitter
on 2019-12-19
+ * CVE-2020-6491: Incorrect security UI in site information. Reported by
Sultan Haikal M.A on 2020-02-07
+- Rebase patch:
+ * chromium-vaapi.patch
+- Remove merged patches:
+ * icu-v67.patch
+ * chromium-80-gcc-blink.patch
+ * chromium-80.0.3987.106-missing-cstddef-header.patch
+ * chromium-80.0.3987.87-missing-cstdint-header.patch
+ * chromium-80.0.3987.87-missing-string-header.patch
+ * chromium-81-gcc-constexpr.patch
+ * chromium-81-gcc-noexcept.patch
+ * chromium-old-glibc-noexcept.patch
+ * fix-vaapi-with-glx.patch
+- Add new patches:
+ * chromium-82-gcc-constexpr.patch
+ * chromium-82-gcc-incomplete-type.patch
+ * chromium-82-gcc-iterator.patch
+ * chromium-82-gcc-noexcept.patch
+ * chromium-82-gcc-template.patch
+ * chromium-83-gcc-10.patch
+ * chromium-83-gcc-include.patch
+ * chromium-83-gcc-iterator.patch
+ * chromium-83-gcc-permissive.patch
+ * chromium-83-gcc-serviceworker.patch
+ * chromium-83-gcc-template.patch
+ * chromium-83-icu67.patch
+
+-------------------------------------------------------------------
+Wed May 6 07:53:39 UTC 2020 - Tomáš Chvátal <[email protected]>
+
+- update to 81.0.4044.138 bsc#1171247:
+ * CVE-2020-6831: Stack buffer overflow in SCTP
+ * CVE-2020-6464: Type Confusion in Blink.
+
+-------------------------------------------------------------------
+Tue May 5 07:39:22 UTC 2020 - Ismail Dönmez <[email protected]>
+
+- Add icu-v67.patch from upstream to fix build with icu v67
+
+-------------------------------------------------------------------
+Wed Apr 29 06:53:20 UTC 2020 - Andreas Stieger <[email protected]>
+
+- update to 81.0.4044.129 (boo#1170707):
+ * CVE-2020-0561: Use after free in storage
+ * CVE-2020-6462: Use after free in task scheduling
+
+-------------------------------------------------------------------
+Tue Apr 28 09:05:34 UTC 2020 - Martin Liška <[email protected]>
+
+- Add chromium-80.0.3987.87-missing-cstdint-header.patch,
+ chromium-80.0.3987.87-missing-string-header.patch and
+ chromium-80.0.3987.106-missing-cstddef-header.patch
+ in order to fix build with GCC 10.
+
+-------------------------------------------------------------------
+Tue Apr 21 23:24:11 UTC 2020 - Andreas Stieger <[email protected]>
+
+- Update to 81.0.4044.122 (boo#1170107 bsc#1171975):
+ * CVE-2020-6459: Use after free in payments
+ * CVE-2020-6460: Insufficient data validation in URL formatting
+ * CVE-2020-6458: Out of bounds read and write in PDFium
+ * CVE-2020-6463: Use after free in ANGLE
+
+-------------------------------------------------------------------
+Fri Apr 17 08:12:35 UTC 2020 - Tomáš Chvátal <[email protected]>
+
+- Update to 81.0.4044.113 bsc#1169729:
+ * CVE-2020-6457: Use after free in speech recognizer
+
+-------------------------------------------------------------------
+Tue Apr 14 13:38:06 UTC 2020 - Tomáš Chvátal <[email protected]>
+
+- Try to use system version of xdg-utils
+
+-------------------------------------------------------------------
+Wed Apr 8 08:41:17 UTC 2020 - Tomáš Chvátal <[email protected]>
+
+- Update to 81.0.4044.92 bsc#1168911:
+ * CVE-2020-6454: Use after free in extensions
+ * CVE-2020-6423: Use after free in audio
+ * CVE-2020-6455: Out of bounds read in WebSQL
+ * CVE-2020-6430: Type Confusion in V8
+ * CVE-2020-6456: Insufficient validation of untrusted input in clipboard
+ * CVE-2020-6431: Insufficient policy enforcement in full screen
+ * CVE-2020-6432: Insufficient policy enforcement in navigations
+ * CVE-2020-6433: Insufficient policy enforcement in extensions
+ * CVE-2020-6434: Use after free in devtools
+ * CVE-2020-6435: Insufficient policy enforcement in extensions
+ * CVE-2020-6436: Use after free in window management
+ * CVE-2020-6437: Inappropriate implementation in WebView
+ * CVE-2020-6438: Insufficient policy enforcement in extensions
+ * CVE-2020-6439: Insufficient policy enforcement in navigations
+ * CVE-2020-6440: Inappropriate implementation in extensions
+ * CVE-2020-6441: Insufficient policy enforcement in omnibox
++++ 5428 more lines (skipped)
++++ between /dev/null
++++ and
/work/SRC/openSUSE:Leap:15.1:Update/.chromium.12662.new.3606/chromium.changes
New:
----
_constraints
build-with-pipewire-0.3.patch
chromium-79-gcc-alignas.patch
chromium-80-gcc-quiche.patch
chromium-81-re2-0.2020.05.01.patch
chromium-82-gcc-constexpr.patch
chromium-82-gcc-incomplete-type.patch
chromium-82-gcc-iterator.patch
chromium-82-gcc-noexcept.patch
chromium-82-gcc-template.patch
chromium-83-gcc-10.patch
chromium-83-gcc-include.patch
chromium-83-gcc-iterator.patch
chromium-83-gcc-permissive.patch
chromium-83-gcc-serviceworker.patch
chromium-83-gcc-template.patch
chromium-83-icu67.patch
chromium-83.0.4103.97.tar.xz
chromium-browser.desktop
chromium-browser.sh
chromium-browser.xml
chromium-buildname.patch
chromium-dma-buf.patch
chromium-drm.patch
chromium-fix-char_traits.patch
chromium-libusb_interrupt_event_handler.patch
chromium-master-prefs-path.patch
chromium-norar.patch
chromium-prop-codecs.patch
chromium-symbolic.svg
chromium-system-libusb.patch
chromium-vaapi-fix.patch
chromium-vaapi.patch
chromium.changes
chromium.default
chromium.spec
exclude_ymp.patch
fix_building_widevinecdm_with_chromium.patch
gcc-enable-lto.patch
gpu-timeout.patch
master_preferences
no-location-leap151.patch
old-libva.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ chromium.spec ++++++
++++ 820 lines (skipped)
++++++ _constraints ++++++
<?xml version="1.0"?>
<constraints>
<hardware>
<disk>
<size unit="G">30</size>
</disk>
<physicalmemory>
<size unit="G">8</size>
</physicalmemory>
</hardware>
<overwrite>
<conditions>
<arch>x86_64</arch>
</conditions>
<hardware>
<memory>
<size unit="G">16</size>
</memory>
</hardware>
</overwrite>
</constraints>
++++++ build-with-pipewire-0.3.patch ++++++
Index: chromium-81.0.4044.83/third_party/webrtc/modules/desktop_capture/BUILD.gn
===================================================================
---
chromium-81.0.4044.83.orig/third_party/webrtc/modules/desktop_capture/BUILD.gn
+++ chromium-81.0.4044.83/third_party/webrtc/modules/desktop_capture/BUILD.gn
@@ -196,7 +196,7 @@ if (is_linux) {
if (rtc_link_pipewire) {
pkg_config("pipewire") {
- packages = [ "libpipewire-0.2" ]
+ packages = [ "libpipewire-${rtc_use_pipewire_version}" ]
}
} else {
# When libpipewire is not directly linked, use stubs to allow for
dlopening of
Index:
chromium-81.0.4044.83/third_party/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc
===================================================================
---
chromium-81.0.4044.83.orig/third_party/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc
+++
chromium-81.0.4044.83/third_party/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc
@@ -14,8 +14,13 @@
#include <glib-object.h>
#include <spa/param/format-utils.h>
#include <spa/param/props.h>
+#if PW_CHECK_VERSION(0, 2, 90)
+#include <spa/utils/result.h>
+#include <spa/utils/defs.h>
+#else
#include <spa/param/video/raw-utils.h>
#include <spa/support/type-map.h>
+#endif
#include <memory>
#include <utility>
@@ -51,6 +56,21 @@ const char kPipeWireLib[] = "libpipewire
#endif
// static
+#if PW_CHECK_VERSION(0, 2, 90)
+void BaseCapturerPipeWire::OnCoreError(void* data,
+ uint32_t id,
+ int seq,
+ int res,
+ const char *message) {
+ BaseCapturerPipeWire* that = static_cast<BaseCapturerPipeWire*>(data);
+ RTC_DCHECK(that);
+
+ RTC_LOG(LS_WARNING) << "PipeWire core error: id:" << id << " : " << message;
+
+ if (id == PW_ID_CORE && res == -EPIPE)
+ RTC_LOG(LS_WARNING) << "PipeWire core error: Pipe closed.";
+};
+#else
void BaseCapturerPipeWire::OnStateChanged(void* data,
pw_remote_state old_state,
pw_remote_state state,
@@ -64,7 +84,7 @@ void BaseCapturerPipeWire::OnStateChange
break;
case PW_REMOTE_STATE_CONNECTED:
RTC_LOG(LS_INFO) << "PipeWire remote state: connected.";
- that->CreateReceivingStream();
+ that->pw_stream_ = that->CreateReceivingStream();
break;
case PW_REMOTE_STATE_CONNECTING:
RTC_LOG(LS_INFO) << "PipeWire remote state: connecting.";
@@ -74,6 +94,7 @@ void BaseCapturerPipeWire::OnStateChange
break;
}
}
+#endif
// static
void BaseCapturerPipeWire::OnStreamStateChanged(void* data,
@@ -87,12 +108,16 @@ void BaseCapturerPipeWire::OnStreamState
case PW_STREAM_STATE_ERROR:
RTC_LOG(LS_ERROR) << "PipeWire stream state error: " << error_message;
break;
+#if !PW_CHECK_VERSION(0, 2, 90)
case PW_STREAM_STATE_CONFIGURE:
- pw_stream_set_active(that->pw_stream_, true);
+ pw_stream_set_active(that->pw_stream_, true); // TODO FIXME Removing
this might cause problems?
break;
+#endif
case PW_STREAM_STATE_UNCONNECTED:
case PW_STREAM_STATE_CONNECTING:
+#if !PW_CHECK_VERSION(0, 2, 90)
case PW_STREAM_STATE_READY:
+#endif
case PW_STREAM_STATE_PAUSED:
case PW_STREAM_STATE_STREAMING:
break;
@@ -100,22 +125,39 @@ void BaseCapturerPipeWire::OnStreamState
}
// static
+
+
+#if PW_CHECK_VERSION(0, 2, 90)
+void BaseCapturerPipeWire::OnStreamParamChanged(void* data,
+ uint32_t id,
+ const struct spa_pod* format) {
+#else
void BaseCapturerPipeWire::OnStreamFormatChanged(void* data,
const struct spa_pod* format)
{
+#endif
BaseCapturerPipeWire* that = static_cast<BaseCapturerPipeWire*>(data);
RTC_DCHECK(that);
RTC_LOG(LS_INFO) << "PipeWire stream format changed.";
+#if PW_CHECK_VERSION(0, 2, 90)
+ if (!format || id != SPA_PARAM_Format)
+ return;
+#else
if (!format) {
pw_stream_finish_format(that->pw_stream_, /*res=*/0, /*params=*/nullptr,
/*n_params=*/0);
return;
}
+#endif
that->spa_video_format_ = new spa_video_info_raw();
+#if PW_CHECK_VERSION(0, 2, 90)
+ spa_format_video_raw_parse(format, that->spa_video_format_);
+#else
spa_format_video_raw_parse(format, that->spa_video_format_,
&that->pw_type_->format_video);
+#endif
auto width = that->spa_video_format_->size.width;
auto height = that->spa_video_format_->size.height;
@@ -127,6 +169,16 @@ void BaseCapturerPipeWire::OnStreamForma
// Setup buffers and meta header for new format.
const struct spa_pod* params[2];
+#if PW_CHECK_VERSION(0, 2, 90)
+ params[0] = reinterpret_cast<spa_pod*>(spa_pod_builder_add_object(
+ &builder,
+ SPA_TYPE_OBJECT_ParamBuffers, SPA_PARAM_Buffers,
+ SPA_PARAM_BUFFERS_buffers, SPA_POD_CHOICE_RANGE_Int (8, 1, 32),
+ SPA_PARAM_BUFFERS_blocks, SPA_POD_Int (1),
+ SPA_PARAM_BUFFERS_size, SPA_POD_Int (size),
+ SPA_PARAM_BUFFERS_stride, SPA_POD_Int (stride),
+ SPA_PARAM_BUFFERS_align, SPA_POD_Int (16)));
+#else
params[0] = reinterpret_cast<spa_pod*>(spa_pod_builder_object(
&builder,
// id to enumerate buffer requirements
@@ -145,6 +197,19 @@ void BaseCapturerPipeWire::OnStreamForma
// Align: memory alignment of the buffer, set as integer (i) to specified
// value
":", that->pw_core_type_->param_buffers.align, "i", 16));
+#endif
+
+
+
+#if PW_CHECK_VERSION(0, 2, 90)
+ params[1] = reinterpret_cast<spa_pod*>(spa_pod_builder_add_object(
+ &builder,
+ SPA_TYPE_OBJECT_ParamMeta, SPA_PARAM_Meta,
+ SPA_PARAM_META_type, SPA_POD_Id (SPA_META_Header),
+ SPA_PARAM_META_size, SPA_POD_Int (sizeof (struct spa_meta_header))));
+
+ pw_stream_update_params(that->pw_stream_, params, /*n_params=*/2);
+#else
params[1] = reinterpret_cast<spa_pod*>(spa_pod_builder_object(
&builder,
// id to enumerate supported metadata
@@ -157,6 +222,7 @@ void BaseCapturerPipeWire::OnStreamForma
sizeof(struct spa_meta_header)));
pw_stream_finish_format(that->pw_stream_, /*res=*/0, params, /*n_params=*/2);
+#endif
}
// static
@@ -183,9 +249,11 @@ BaseCapturerPipeWire::~BaseCapturerPipeW
pw_thread_loop_stop(pw_main_loop_);
}
+#if !PW_CHECK_VERSION(0, 2, 90)
if (pw_type_) {
delete pw_type_;
}
+#endif
if (spa_video_format_) {
delete spa_video_format_;
@@ -195,6 +263,16 @@ BaseCapturerPipeWire::~BaseCapturerPipeW
pw_stream_destroy(pw_stream_);
}
+
+#if PW_CHECK_VERSION(0, 2, 90)
+ if (pw_core_) {
+ pw_core_disconnect(pw_core_);
+ }
+
+ if (pw_context_) {
+ pw_context_destroy(pw_context_);
+ }
+#else
if (pw_remote_) {
pw_remote_destroy(pw_remote_);
}
@@ -202,14 +280,17 @@ BaseCapturerPipeWire::~BaseCapturerPipeW
if (pw_core_) {
pw_core_destroy(pw_core_);
}
+#endif
if (pw_main_loop_) {
pw_thread_loop_destroy(pw_main_loop_);
}
+#if !PW_CHECK_VERSION(0, 2, 90)
if (pw_loop_) {
pw_loop_destroy(pw_loop_);
}
+#endif
if (current_frame_) {
free(current_frame_);
@@ -284,6 +365,27 @@ void BaseCapturerPipeWire::InitPipeWire(
pw_init(/*argc=*/nullptr, /*argc=*/nullptr);
+#if PW_CHECK_VERSION(0, 2, 90)
+ pw_main_loop_ = pw_thread_loop_new("pipewire-main-loop", nullptr);
+
+ pw_context_ = pw_context_new(pw_thread_loop_get_loop(pw_main_loop_),
/*properties=*/nullptr, /*user_data_size=*/0);
+ if (!pw_context_)
+ {
+ RTC_LOG(LS_ERROR) << "Failed to create PipeWire context.";
+ portal_init_failed_ = true;
+ return;
+ }
+
+ pw_core_ = pw_context_connect(pw_context_, nullptr, /*user_data_size=*/0);
+ if (!pw_core_)
+ {
+ RTC_LOG(LS_ERROR) << "Failed to connect PipeWire context.";
+ portal_init_failed_ = true;
+ return;
+ }
+ pw_core_events_.version = PW_VERSION_CORE_EVENTS;
+ pw_core_events_.error = &OnCoreError;
+#else
pw_loop_ = pw_loop_new(/*properties=*/nullptr);
pw_main_loop_ = pw_thread_loop_new(pw_loop_, "pipewire-main-loop");
@@ -296,15 +398,30 @@ void BaseCapturerPipeWire::InitPipeWire(
// Initialize event handlers, remote end and stream-related.
pw_remote_events_.version = PW_VERSION_REMOTE_EVENTS;
pw_remote_events_.state_changed = &OnStateChanged;
+#endif
pw_stream_events_.version = PW_VERSION_STREAM_EVENTS;
pw_stream_events_.state_changed = &OnStreamStateChanged;
+#if PW_CHECK_VERSION(0, 2, 90)
+ pw_stream_events_.param_changed = &OnStreamParamChanged;
+#else
pw_stream_events_.format_changed = &OnStreamFormatChanged;
+#endif
pw_stream_events_.process = &OnStreamProcess;
+#if PW_CHECK_VERSION(0, 2, 90)
+ pw_core_add_listener (pw_core_,
+ &pw_core_listener_,
+ &pw_core_events_,
+ this);
+ pw_stream_ = CreateReceivingStream ();
+ if (!pw_stream_)
+ return;
+#else
pw_remote_add_listener(pw_remote_, &spa_remote_listener_, &pw_remote_events_,
this);
pw_remote_connect_fd(pw_remote_, pw_fd_);
+#endif
if (pw_thread_loop_start(pw_main_loop_) < 0) {
RTC_LOG(LS_ERROR) << "Failed to start main PipeWire loop";
@@ -314,6 +431,7 @@ void BaseCapturerPipeWire::InitPipeWire(
RTC_LOG(LS_INFO) << "PipeWire remote opened.";
}
+#if !PW_CHECK_VERSION(0, 2, 90)
void BaseCapturerPipeWire::InitPipeWireTypes() {
spa_type_map* map = pw_core_type_->map;
pw_type_ = new PipeWireType();
@@ -323,23 +441,41 @@ void BaseCapturerPipeWire::InitPipeWireT
spa_type_format_video_map(map, &pw_type_->format_video);
spa_type_video_format_map(map, &pw_type_->video_format);
}
+#endif
-void BaseCapturerPipeWire::CreateReceivingStream() {
- spa_rectangle pwMinScreenBounds = spa_rectangle{1, 1};
+pw_stream *BaseCapturerPipeWire::CreateReceivingStream() {
+ spa_rectangle pwMinScreenBounds = SPA_RECTANGLE(1, 1);
spa_rectangle pwScreenBounds =
- spa_rectangle{static_cast<uint32_t>(desktop_size_.width()),
- static_cast<uint32_t>(desktop_size_.height())};
+ SPA_RECTANGLE(static_cast<uint32_t>(desktop_size_.width()),
+ static_cast<uint32_t>(desktop_size_.height()));
+
+ spa_fraction pwFrameRateMin = SPA_FRACTION(0, 1);
+ spa_fraction pwFrameRateMax = SPA_FRACTION(60, 1);
- spa_fraction pwFrameRateMin = spa_fraction{0, 1};
- spa_fraction pwFrameRateMax = spa_fraction{60, 1};
pw_properties* reuseProps =
pw_properties_new_string("pipewire.client.reuse=1");
- pw_stream_ = pw_stream_new(pw_remote_, "webrtc-consume-stream", reuseProps);
+#if PW_CHECK_VERSION(0, 2, 90)
+ pw_stream *stream = pw_stream_new(pw_core_, "webrtc-consume-stream",
reuseProps);
+#else
+ pw_stream *stream = pw_stream_new(pw_remote_, "webrtc-consume-stream",
reuseProps);
+#endif
uint8_t buffer[1024] = {};
const spa_pod* params[1];
spa_pod_builder builder = spa_pod_builder{buffer, sizeof(buffer)};
+#if PW_CHECK_VERSION(0, 2, 90)
+ params[0] = reinterpret_cast<spa_pod*>(spa_pod_builder_add_object(
+ &builder,
+ // id to enumerate formats
+ SPA_TYPE_OBJECT_Format, SPA_PARAM_EnumFormat,
+ SPA_FORMAT_mediaType, SPA_POD_Id (SPA_MEDIA_TYPE_video),
+ SPA_FORMAT_mediaSubtype, SPA_POD_Id (SPA_MEDIA_SUBTYPE_raw),
+ SPA_FORMAT_VIDEO_format, SPA_POD_Id (SPA_VIDEO_FORMAT_BGRx),
+ SPA_FORMAT_VIDEO_size, SPA_POD_CHOICE_RANGE_Rectangle(&pwScreenBounds,
&pwMinScreenBounds, &pwScreenBounds),
+ SPA_FORMAT_VIDEO_framerate, SPA_POD_Fraction(&pwFrameRateMin),
+ SPA_FORMAT_VIDEO_maxFramerate,
SPA_POD_CHOICE_RANGE_Fraction(&pwFrameRateMax, &pwFrameRateMin,
&pwFrameRateMax)));
+#else
params[0] = reinterpret_cast<spa_pod*>(spa_pod_builder_object(
&builder,
// id to enumerate formats
@@ -364,19 +500,28 @@ void BaseCapturerPipeWire::CreateReceivi
// min and max values and it is undecided (u) to allow negotiation
":", pw_type_->format_video.max_framerate, "Fru", &pwFrameRateMax, 2,
&pwFrameRateMin, &pwFrameRateMax));
-
- pw_stream_add_listener(pw_stream_, &spa_stream_listener_, &pw_stream_events_,
+ pw_stream_add_listener(stream, &spa_stream_listener_, &pw_stream_events_,
this);
+#endif
+
pw_stream_flags flags = static_cast<pw_stream_flags>(
PW_STREAM_FLAG_AUTOCONNECT | PW_STREAM_FLAG_INACTIVE |
PW_STREAM_FLAG_MAP_BUFFERS);
- if (pw_stream_connect(pw_stream_, PW_DIRECTION_INPUT, /*port_path=*/nullptr,
+
+#if PW_CHECK_VERSION(0, 2, 90)
+ if (pw_stream_connect(stream, PW_DIRECTION_INPUT, PW_ID_ANY,
+ flags, params,
+ /*n_params=*/1) != 0) {
+#else
+ if (pw_stream_connect(stream, PW_DIRECTION_INPUT, /*port_path=*/nullptr,
flags, params,
/*n_params=*/1) != 0) {
+#endif
RTC_LOG(LS_ERROR) << "Could not connect receiving stream.";
portal_init_failed_ = true;
- return;
}
+
+ return stream;
}
void BaseCapturerPipeWire::HandleBuffer(pw_buffer* buffer) {
@@ -404,7 +549,11 @@ void BaseCapturerPipeWire::HandleBuffer(
// If both sides decided to go with the RGBx format we need to convert it to
// BGRx to match color format expected by WebRTC.
+#if PW_CHECK_VERSION(0, 2, 90)
+ if (spa_video_format_->format == SPA_VIDEO_FORMAT_RGBx) {
+#else
if (spa_video_format_->format == pw_type_->video_format.RGBx) {
+#endif
uint8_t* tempFrame = static_cast<uint8_t*>(malloc(maxSize));
std::memcpy(tempFrame, src, maxSize);
ConvertRGBxToBGRx(tempFrame, maxSize);
Index:
chromium-81.0.4044.83/third_party/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.h
===================================================================
---
chromium-81.0.4044.83.orig/third_party/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.h
+++
chromium-81.0.4044.83/third_party/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.h
@@ -22,6 +22,7 @@
namespace webrtc {
+#if !PW_CHECK_VERSION(0, 2, 90)
class PipeWireType {
public:
spa_type_media_type media_type;
@@ -29,6 +30,7 @@ class PipeWireType {
spa_type_format_video format_video;
spa_type_video_format video_format;
};
+#endif
class BaseCapturerPipeWire : public DesktopCapturer {
public:
@@ -45,6 +47,18 @@ class BaseCapturerPipeWire : public Desk
private:
// PipeWire types -->
+#if PW_CHECK_VERSION(0, 2, 90)
+ pw_context* pw_context_ = nullptr;
+ pw_core* pw_core_ = nullptr;
+ pw_stream* pw_stream_ = nullptr;
+ pw_thread_loop* pw_main_loop_ = nullptr;
+
+ spa_hook pw_core_listener_ = {};
+ spa_hook spa_stream_listener_ = {};
+
+ pw_core_events pw_core_events_ = {};
+ pw_stream_events pw_stream_events_ = {};
+#else
pw_core* pw_core_ = nullptr;
pw_type* pw_core_type_ = nullptr;
pw_stream* pw_stream_ = nullptr;
@@ -58,6 +72,7 @@ class BaseCapturerPipeWire : public Desk
pw_stream_events pw_stream_events_ = {};
pw_remote_events pw_remote_events_ = {};
+#endif
spa_video_info_raw* spa_video_format_ = nullptr;
@@ -89,23 +104,38 @@ class BaseCapturerPipeWire : public Desk
void InitPortal();
void InitPipeWire();
+#if !PW_CHECK_VERSION(0, 2, 90)
void InitPipeWireTypes();
+#endif
- void CreateReceivingStream();
+ pw_stream *CreateReceivingStream();
void HandleBuffer(pw_buffer* buffer);
void ConvertRGBxToBGRx(uint8_t* frame, uint32_t size);
+#if PW_CHECK_VERSION(0, 2, 90)
+ static void OnCoreError(void* data,
+ uint32_t id,
+ int seq,
+ int res,
+ const char *message);
+#else
static void OnStateChanged(void* data,
pw_remote_state old_state,
pw_remote_state state,
const char* error);
+#endif
static void OnStreamStateChanged(void* data,
pw_stream_state old_state,
pw_stream_state state,
const char* error_message);
+#if PW_CHECK_VERSION(0, 2, 90)
+ static void OnStreamParamChanged(void* data, uint32_t id, const struct
spa_pod* format);
+#else
static void OnStreamFormatChanged(void* data, const struct spa_pod* format);
+#endif
+
static void OnStreamProcess(void* data);
static void OnNewBuffer(void* data, uint32_t id);
Index: chromium-81.0.4044.83/third_party/webrtc/webrtc.gni
===================================================================
--- chromium-81.0.4044.83.orig/third_party/webrtc/webrtc.gni
+++ chromium-81.0.4044.83/third_party/webrtc/webrtc.gni
@@ -114,6 +114,9 @@ declare_args() {
# supported Ubuntu and Debian distributions.
rtc_use_pipewire = is_desktop_linux && use_sysroot
+ # Sets the pipewire pkg-config version to use if rtc_use_pipewire is true
+ rtc_use_pipewire_version = "0.2"
+
# Set this to link PipeWire directly instead of using the dlopen.
rtc_link_pipewire = false
++++++ chromium-79-gcc-alignas.patch ++++++
Re-use chromium alignas workaround in protobuf.
---
diff --git a/third_party/protobuf/src/google/protobuf/arena.h
b/third_party/protobuf/src/google/protobuf/arena.h
index dedc221..a8515ce 100644
--- a/third_party/protobuf/src/google/protobuf/arena.h
+++ b/third_party/protobuf/src/google/protobuf/arena.h
@@ -245,7 +245,7 @@ struct ArenaOptions {
// well as protobuf container types like RepeatedPtrField and Map. The protocol
// is internal to protobuf and is not guaranteed to be stable. Non-proto types
// should not rely on this protocol.
-class PROTOBUF_EXPORT alignas(8) Arena final {
+class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena final {
public:
// Arena constructor taking custom options. See ArenaOptions below for
// descriptions of the options available.
diff --git a/third_party/protobuf/src/google/protobuf/port_def.inc
b/third_party/protobuf/src/google/protobuf/port_def.inc
index f1bd85d..6d02b53 100644
--- a/third_party/protobuf/src/google/protobuf/port_def.inc
+++ b/third_party/protobuf/src/google/protobuf/port_def.inc
@@ -528,6 +528,35 @@ PROTOBUF_EXPORT_TEMPLATE_TEST(DEFAULT,
__declspec(dllimport));
#undef IN
#endif // _MSC_VER
+// Specify memory alignment for structs, classes, etc.
+// Use like:
+// class PROTOBUF_ALIGNAS(16) MyClass { ... }
+// PROTOBUF_ALIGNAS(16) int array[4];
+//
+// In most places you can use the C++11 keyword "alignas", which is preferred.
+//
+// But compilers have trouble mixing __attribute__((...)) syntax with
+// alignas(...) syntax.
+//
+// Doesn't work in clang or gcc:
+// struct alignas(16) __attribute__((packed)) S { char c; };
+// Works in clang but not gcc:
+// struct __attribute__((packed)) alignas(16) S2 { char c; };
+// Works in clang and gcc:
+// struct alignas(16) S3 { char c; } __attribute__((packed));
+//
+// There are also some attributes that must be specified *before* a class
+// definition: visibility (used for exporting functions/classes) is one of
+// these attributes. This means that it is not possible to use alignas() with a
+// class that is marked as exported.
+#if defined(_MSC_VER)
+#define PROTOBUF_ALIGNAS(byte_alignment) __declspec(align(byte_alignment))
+#elif defined(__GNUC__)
+#define PROTOBUF_ALIGNAS(byte_alignment)
__attribute__((aligned(byte_alignment)))
+#else
+#define PROTOBUF_ALIGNAS(byte_alignment) alignas(byte_alignment)
+#endif
+
#if defined(__clang__)
#pragma clang diagnostic push
// TODO(gerbens) ideally we cleanup the code. But a cursory try shows many
diff --git a/third_party/protobuf/src/google/protobuf/port_undef.inc
b/third_party/protobuf/src/google/protobuf/port_undef.inc
index b7e67fe..ba1fffc 100644
--- a/third_party/protobuf/src/google/protobuf/port_undef.inc
+++ b/third_party/protobuf/src/google/protobuf/port_undef.inc
@@ -80,6 +80,7 @@
#undef PROTOBUF_EXPORT_TEMPLATE_STYLE_MATCH_foj3FJo5StF0OvIzl7oMxA__declspec
#undef PROTOBUF_EXPORT_TEMPLATE_STYLE_MATCH_DECLSPEC_dllexport
#undef PROTOBUF_EXPORT_TEMPLATE_STYLE_MATCH_DECLSPEC_dllimport
+#undef PROTOBUF_ALIGNAS
++++++ chromium-80-gcc-quiche.patch ++++++
>From 00f47df999c9b19e80fdc01db0ae9ca1b6a12b3a Mon Sep 17 00:00:00 2001
From: vasilvv <[email protected]>
Date: Wed, 03 Apr 2019 13:58:53 -0700
Subject: [PATCH] GCC: do not delete move constructor of QuicStreamSendBuffer
QuicStreamSendBuffer constructor is implicitely required in the
initialization of the vector of substreams in QuicCryptoStream.
Though clang apparently ignores that, GCC fails to build.
BUG=chromium:819294
Originally submitted by José Dapena Paz <[email protected]> at
https://quiche-review.googlesource.com/c/quiche/+/2420
PiperOrigin-RevId: 241800134
Change-Id: I4e3c97d6e5895d85340e8c1b740e6196d9104066
---
diff --git a/net/third_party/quiche/src/quic/core/quic_stream_send_buffer.h
b/net/third_party/quiche/src/quic/core/quic_stream_send_buffer.h
index e34514b..74e9d0d 100644
--- a/net/third_party/quiche/src/quic/core/quic_stream_send_buffer.h
+++ b/net/third_party/quiche/src/quic/core/quic_stream_send_buffer.h
@@ -62,7 +62,7 @@
public:
explicit QuicStreamSendBuffer(QuicBufferAllocator* allocator);
QuicStreamSendBuffer(const QuicStreamSendBuffer& other) = delete;
- QuicStreamSendBuffer(QuicStreamSendBuffer&& other) = delete;
+ QuicStreamSendBuffer(QuicStreamSendBuffer&& other) = default;
~QuicStreamSendBuffer();
// Save |data_length| of data starts at |iov_offset| in |iov| to send buffer.
++++++ chromium-81-re2-0.2020.05.01.patch ++++++
https://chromium.googlesource.com/chromium/src/+/ede390a0b18e4565abf8ac1e1ff717e1d43fc320
--- /components/autofill/core/browser/address_rewriter.cc
+++ /components/autofill/core/browser/address_rewriter.cc
@@ -57,7 +57,7 @@
CompiledRuleVector* compiled_rules) {
base::StringPiece data = data_string;
re2::RE2::Options options;
- options.set_utf8(true);
+ options.set_encoding(RE2::Options::EncodingUTF8);
options.set_word_boundary(true);
size_t token_end = 0;
++++++ chromium-82-gcc-constexpr.patch ++++++
>From 5812cd9bc2c15a034db24e0d2a43cc923d8a66cc Mon Sep 17 00:00:00 2001
From: Jose Dapena Paz <[email protected]>
Date: Thu, 20 Feb 2020 13:00:16 +0100
Subject: [PATCH] GCC: DOMRect constexpr equal operator depends on non constexpr
operators
Make accessors of DOMRectReadOnly constexpr so the equal operator can be
also constexpr.
../../third_party/blink/renderer/core/geometry/dom_rect.h: In function
‘constexpr bool blink::operator==(const blink::DOMRect&, const
blink::DOMRect&)’:
../../third_party/blink/renderer/core/geometry/dom_rect.h:38:15: error: call to
non-‘constexpr’ function ‘double blink::DOMRectReadOnly::x() const’
Bug: 819294
Change-Id: Ic1fed89c5480ce4eedaaf7add2779d000b77cc48
---
Index:
chromium-83.0.4103.14/third_party/blink/renderer/core/geometry/dom_rect_read_only.h
===================================================================
---
chromium-83.0.4103.14.orig/third_party/blink/renderer/core/geometry/dom_rect_read_only.h
+++
chromium-83.0.4103.14/third_party/blink/renderer/core/geometry/dom_rect_read_only.h
@@ -31,10 +31,10 @@ class CORE_EXPORT DOMRectReadOnly : publ
DOMRectReadOnly(double x, double y, double width, double height);
- double x() const { return x_; }
- double y() const { return y_; }
- double width() const { return width_; }
- double height() const { return height_; }
+ constexpr double x() const { return x_; }
+ constexpr double y() const { return y_; }
+ constexpr double width() const { return width_; }
+ constexpr double height() const { return height_; }
double top() const { return geometry_util::NanSafeMin(y_, y_ + height_); }
double right() const { return geometry_util::NanSafeMax(x_, x_ + width_); }
++++++ chromium-82-gcc-incomplete-type.patch ++++++
diff --git a/ui/accessibility/ax_tree.cc b/ui/accessibility/ax_tree.cc
index 616d53f..26749e3 100644
--- a/ui/accessibility/ax_tree.cc
+++ b/ui/accessibility/ax_tree.cc
@@ -565,15 +565,6 @@ struct AXTreeUpdateState {
const AXTree& tree;
};
-struct AXTree::NodeSetSizePosInSetInfo {
- NodeSetSizePosInSetInfo() = default;
- ~NodeSetSizePosInSetInfo() = default;
-
- int32_t pos_in_set = 0;
- int32_t set_size = 0;
- base::Optional<int> lowest_hierarchical_level;
-};
-
struct AXTree::OrderedSetContent {
explicit OrderedSetContent(const AXNode* ordered_set = nullptr)
: ordered_set_(ordered_set) {}
diff --git a/ui/accessibility/ax_tree.h b/ui/accessibility/ax_tree.h
index 3bbbe0c..e4288f5 100644
--- a/ui/accessibility/ax_tree.h
+++ b/ui/accessibility/ax_tree.h
@@ -323,7 +323,14 @@ class AX_EXPORT AXTree : public AXNode::OwnerTree {
bool enable_extra_mac_nodes_ = false;
// Contains pos_in_set and set_size data for an AXNode.
- struct NodeSetSizePosInSetInfo;
+ struct NodeSetSizePosInSetInfo {
+ NodeSetSizePosInSetInfo() = default;
+ ~NodeSetSizePosInSetInfo() = default;
+
+ int32_t pos_in_set = 0;
+ int32_t set_size = 0;
+ base::Optional<int> lowest_hierarchical_level;
+ };
// Represents the content of an ordered set which includes the ordered set
// items and the ordered set container if it exists.
++++++ chromium-82-gcc-iterator.patch ++++++
diff --git
a/third_party/blink/renderer/core/layout/ng/ng_physical_container_fragment.h
b/third_party/blink/renderer/core/layout/ng/ng_physical_container_fragment.h
index b3c7624..85936aa 100644
--- a/third_party/blink/renderer/core/layout/ng/ng_physical_container_fragment.h
+++ b/third_party/blink/renderer/core/layout/ng/ng_physical_container_fragment.h
@@ -5,6 +5,8 @@
#ifndef
THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_NG_NG_PHYSICAL_CONTAINER_FRAGMENT_H_
#define
THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_NG_NG_PHYSICAL_CONTAINER_FRAGMENT_H_
+#include <iterator>
+
#include "base/containers/span.h"
#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/core/layout/geometry/physical_rect.h"
@@ -31,7 +33,8 @@ class CORE_EXPORT NGPhysicalContainerFragment : public
NGPhysicalFragment {
PostLayoutChildLinkList(wtf_size_t count, const NGLink* buffer)
: count_(count), buffer_(buffer) {}
- class ConstIterator {
+ class ConstIterator : public std::iterator<std::input_iterator_tag,
+ NGLink> {
STACK_ALLOCATED();
public:
++++++ chromium-82-gcc-noexcept.patch ++++++
diff --git a/ui/color/color_set.cc b/ui/color/color_set.cc
index 56564d7..2798a3c 100644
--- a/ui/color/color_set.cc
+++ b/ui/color/color_set.cc
@@ -11,7 +11,7 @@ ColorSet::ColorSet(ColorSetId id, ColorMap&& colors)
ColorSet::ColorSet(ColorSet&&) noexcept = default;
-ColorSet& ColorSet::operator=(ColorSet&&) noexcept = default;
+ColorSet& ColorSet::operator=(ColorSet&&) = default;
ColorSet::~ColorSet() = default;
diff --git a/third_party/blink/public/platform/cross_variant_mojo_util.h
b/third_party/blink/public/platform/cross_variant_mojo_util.h
index dee0b95..0c83580 100644
--- a/third_party/blink/public/platform/cross_variant_mojo_util.h
+++ b/third_party/blink/public/platform/cross_variant_mojo_util.h
@@ -124,7 +124,7 @@ class CrossVariantMojoAssociatedReceiver {
~CrossVariantMojoAssociatedReceiver() = default;
CrossVariantMojoAssociatedReceiver(
- CrossVariantMojoAssociatedReceiver&&) noexcept = default;
+ CrossVariantMojoAssociatedReceiver&&) = default;
CrossVariantMojoAssociatedReceiver& operator=(
CrossVariantMojoAssociatedReceiver&&) noexcept = default;
@@ -155,7 +155,7 @@ class CrossVariantMojoAssociatedRemote {
~CrossVariantMojoAssociatedRemote() = default;
CrossVariantMojoAssociatedRemote(
- CrossVariantMojoAssociatedRemote&&) noexcept = default;
+ CrossVariantMojoAssociatedRemote&&) = default;
CrossVariantMojoAssociatedRemote& operator=(
CrossVariantMojoAssociatedRemote&&) noexcept = default;
++++++ chromium-82-gcc-template.patch ++++++
diff --git a/content/public/browser/web_ui.h b/content/public/browser/web_ui.h
index 4e6aa0e..fa6f10c 100644
--- a/content/public/browser/web_ui.h
+++ b/content/public/browser/web_ui.h
@@ -138,22 +138,6 @@ class CONTENT_EXPORT WebUI {
template <typename T>
static T GetValue(const base::Value& value);
- template <>
- inline bool GetValue<bool>(const base::Value& value) {
- return value.GetBool();
- }
-
- template <>
- inline int GetValue<int>(const base::Value& value) {
- return value.GetInt();
- }
-
- template <>
- inline const std::string& GetValue<const std::string&>(
- const base::Value& value) {
- return value.GetString();
- }
-
template <typename Is, typename... Args>
struct Call;
@@ -169,6 +153,22 @@ class CONTENT_EXPORT WebUI {
};
};
+template <>
+inline bool WebUI::GetValue<bool>(const base::Value& value) {
+ return value.GetBool();
+}
+
+template <>
+inline int WebUI::GetValue<int>(const base::Value& value) {
+ return value.GetInt();
+}
+
+template <>
+inline const std::string& WebUI::GetValue<const std::string&>(
+ const base::Value& value) {
+ return value.GetString();
+}
+
} // namespace content
#endif // CONTENT_PUBLIC_BROWSER_WEB_UI_H_
++++++ chromium-83-gcc-10.patch ++++++
>From e473f41284ccc8fa4bc4622d087194b18a1ec23a Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <[email protected]>
Date: Tue, 7 Apr 2020 16:37:10 +0000
Subject: [PATCH] GCC: fix includes for gcc-10
---
chrome/browser/search/background/ntp_backgrounds.h | 1 +
third_party/webrtc/call/rtx_receive_stream.h | 1 +
.../webrtc/modules/audio_processing/aec3/clockdrift_detector.h | 1 +
ui/gfx/linux/drm_util_linux.h | 2 ++
5 files changed, 6 insertions(+)
diff --git a/chrome/browser/search/background/ntp_backgrounds.h
b/chrome/browser/search/background/ntp_backgrounds.h
index 7afc0a2..ea5818e 100644
--- a/chrome/browser/search/background/ntp_backgrounds.h
+++ b/chrome/browser/search/background/ntp_backgrounds.h
@@ -6,6 +6,7 @@
#define CHROME_BROWSER_SEARCH_BACKGROUND_NTP_BACKGROUNDS_H_
#include <array>
+#include <cstddef>
class GURL;
diff --git a/third_party/webrtc/call/rtx_receive_stream.h
b/third_party/webrtc/call/rtx_receive_stream.h
index 8ffa440..113a816 100644
--- a/third_party/webrtc/call/rtx_receive_stream.h
+++ b/third_party/webrtc/call/rtx_receive_stream.h
@@ -12,6 +12,7 @@
#define CALL_RTX_RECEIVE_STREAM_H_
#include <map>
+#include <cstdint>
#include "call/rtp_packet_sink_interface.h"
diff --git
a/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h
b/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h
index 22528c9..69e624e 100644
--- a/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h
+++ b/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h
@@ -12,6 +12,7 @@
#define MODULES_AUDIO_PROCESSING_AEC3_CLOCKDRIFT_DETECTOR_H_
#include <array>
+#include <cstddef>
namespace webrtc {
diff --git a/ui/gfx/linux/drm_util_linux.h b/ui/gfx/linux/drm_util_linux.h
index 86ff2eb..990f12c 100644
--- a/ui/gfx/linux/drm_util_linux.h
+++ b/ui/gfx/linux/drm_util_linux.h
@@ -7,6 +7,8 @@
#include "ui/gfx/buffer_types.h"
+#include <cstdint>
+
namespace ui {
int GetFourCCFormatFromBufferFormat(gfx::BufferFormat format);
--
2.24.1
++++++ chromium-83-gcc-include.patch ++++++
>From 3681c96f54b34f60493cbbf5ec830f158e469799 Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <[email protected]>
Date: Thu, 2 Apr 2020 14:35:44 +0000
Subject: [PATCH] IWYU: std::find is defined in algorithm
---
extensions/browser/install/crx_install_error.cc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/extensions/browser/install/crx_install_error.cc
b/extensions/browser/install/crx_install_error.cc
index a9765bb..bd0d3e3 100644
--- a/extensions/browser/install/crx_install_error.cc
+++ b/extensions/browser/install/crx_install_error.cc
@@ -4,6 +4,8 @@
#include "extensions/browser/install/crx_install_error.h"
+#include <algorithm>
+
#include "base/logging.h"
#include "extensions/browser/install/sandboxed_unpacker_failure_reason.h"
--
2.24.1
>From 80044e30e0014c4c322178e4b56ddbb10eede304 Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <[email protected]>
Date: Thu, 9 Apr 2020 17:58:06 +0000
Subject: [PATCH] IWYU: std::unique_ptr is defined in memory
---
.../blink/renderer/core/html/trust_token_attribute_parsing.h | 2 ++
1 file changed, 2 insertions(+)
diff --git
a/third_party/blink/renderer/core/html/trust_token_attribute_parsing.h
b/third_party/blink/renderer/core/html/trust_token_attribute_parsing.h
index f5a7ab0..ef19cfa 100644
--- a/third_party/blink/renderer/core/html/trust_token_attribute_parsing.h
+++ b/third_party/blink/renderer/core/html/trust_token_attribute_parsing.h
@@ -5,6 +5,8 @@
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_HTML_TRUST_TOKEN_ATTRIBUTE_PARSING_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_HTML_TRUST_TOKEN_ATTRIBUTE_PARSING_H_
+#include <memory>
+
#include "base/optional.h"
#include "services/network/public/mojom/trust_tokens.mojom-blink-forward.h"
#include "third_party/blink/renderer/core/core_export.h"
--
2.24.1
>From 4f4d0a6d453bc22a6397dadaf6d866b4eb2d6b95 Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <[email protected]>
Date: Fri, 10 Apr 2020 08:31:08 +0000
Subject: [PATCH] IWYU: std::numeric_limits is defined in limits
---
.../graph/policies/background_tab_loading_policy_helpers.cc | 2 ++
1 file changed, 2 insertions(+)
diff --git
a/chrome/browser/performance_manager/graph/policies/background_tab_loading_policy_helpers.cc
b/chrome/browser/performance_manager/graph/policies/background_tab_loading_policy_helpers.cc
index 6ab117b..43aa602 100644
---
a/chrome/browser/performance_manager/graph/policies/background_tab_loading_policy_helpers.cc
+++
b/chrome/browser/performance_manager/graph/policies/background_tab_loading_policy_helpers.cc
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <limits>
+
#include
"chrome/browser/performance_manager/graph/policies/background_tab_loading_policy_helpers.h"
#include "base/logging.h"
--
2.24.1
++++++ chromium-83-gcc-iterator.patch ++++++
>From 4abcf0a76a7cb5c343be7d17c60cb908f3673c3d Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <[email protected]>
Date: Thu, 9 Apr 2020 17:03:38 +0000
Subject: [PATCH] libstdc++: replace std::any_of in blink::SerializedScriptValue
Use of std::any_of requires STL compliant iterator. However,
HashTableIterator does not define iterator_tag and therefore
is no STL iterator.
---
.../core/v8/serialization/serialized_script_value.h | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git
a/third_party/blink/renderer/bindings/core/v8/serialization/serialized_script_value.h
b/third_party/blink/renderer/bindings/core/v8/serialization/serialized_script_value.h
index bbf10ef..53d98c9 100644
---
a/third_party/blink/renderer/bindings/core/v8/serialization/serialized_script_value.h
+++
b/third_party/blink/renderer/bindings/core/v8/serialization/serialized_script_value.h
@@ -268,12 +268,17 @@ class CORE_EXPORT SerializedScriptValue
MessagePortChannelArray& GetStreamChannels() { return stream_channels_; }
bool IsLockedToAgentCluster() const {
+ auto AnyOfIsLockedToAgentCluster = [&]() {
+ for (auto entry = attachments_.begin();
+ entry != attachments_.end(); ++entry) {
+ if (entry->value->IsLockedToAgentCluster())
+ return true;
+ }
+ return false;
+ };
return !wasm_modules_.IsEmpty() ||
!shared_array_buffers_contents_.IsEmpty() ||
- std::any_of(attachments_.begin(), attachments_.end(),
- [](const auto& entry) {
- return entry.value->IsLockedToAgentCluster();
- });
+ AnyOfIsLockedToAgentCluster();
}
// Returns true after serializing script values that remote origins cannot
--
2.24.1
++++++ chromium-83-gcc-permissive.patch ++++++
>From fdf2767e8dc54727c9536a4d39d230a959e3698c Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <[email protected]>
Date: Thu, 2 Apr 2020 16:16:14 +0000
Subject: [PATCH] GCC: add missing apps namespace to BrowserAppLauncher
GCC does not get namespace of BrowserAppLauncher right and
fails like this:
chrome/browser/apps/app_service/app_service_proxy.h:82:23: error:
declaration of 'apps::BrowserAppLauncher&
apps::AppServiceProxy::BrowserAppLauncher()' changes meaning of
'BrowserAppLauncher' [-fpermissive]
---
chrome/browser/apps/app_service/app_service_proxy.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/chrome/browser/apps/app_service/app_service_proxy.h
b/chrome/browser/apps/app_service/app_service_proxy.h
index b7fff63..1ecd49d 100644
--- a/chrome/browser/apps/app_service/app_service_proxy.h
+++ b/chrome/browser/apps/app_service/app_service_proxy.h
@@ -79,7 +79,7 @@ class AppServiceProxy : public KeyedService,
apps::InstanceRegistry& InstanceRegistry();
#endif
- BrowserAppLauncher& BrowserAppLauncher();
+ apps::BrowserAppLauncher& BrowserAppLauncher();
apps::PreferredAppsList& PreferredApps();
--
2.24.1
++++++ chromium-83-gcc-serviceworker.patch ++++++
>From 0914a38252f205fc04fa50e858b24fa5f535ab11 Mon Sep 17 00:00:00 2001
From: Hiroki Nakagawa <[email protected]>
Date: Wed, 29 Apr 2020 11:46:54 +0900
Subject: [PATCH] ServiceWorker: Avoid double destruction of
ServiceWorkerObjectHost on connection error
This CL avoids the case where ServiceWorkerObjectHost is destroyed twice
on ServiceWorkerObjectHost::OnConnectionError() when Chromium is built
with the GCC build toolchain.
> How does the issue happen?
ServiceWorkerObjectHost has a cyclic reference like this:
ServiceWorkerObjectHost
--([1] scoped_refptr)--> ServiceWorkerVersion
--([2] std::unique_ptr)--> ServiceWorkerProviderHost
--([3] std::unique_ptr)--> ServiceWorkerContainerHost
--([4] std::unique_ptr)--> ServiceWorkerObjectHost
Note that ServiceWorkerContainerHost manages ServiceWorkerObjectHost in
map<int64_t version_id, std::unique_ptr<ServiceWorkerObjectHost>>.
When ServiceWorkerObjectHost::OnConnectionError() is called, the
function removes the reference [4] from the map, and destroys
ServiceWorkerObjectHost. If the object host has the last reference [1]
to ServiceWorkerVersion, the destruction also cuts off the references
[2] and [3], and destroys ServiceWorkerProviderHost and
ServiceWorkerContainerHost.
This seems to work well on the Chromium's default toolchain, but not
work on the GCC toolchain. According to the report, destruction of
ServiceWorkerContainerHost happens while the map owned by the container
host is erasing the ServiceWorkerObjectHost, and this results in crash
due to double destruction of the object host.
I don't know the reason why this happens only on the GCC toolchain, but
I suspect the order of object destruction on std::map::erase() could be
different depending on the toolchains.
> How does this CL fix this?
The ideal fix is to redesign the ownership model of
ServiceWorkerVersion, but it's not feasible in the short term.
Instead, this CL avoids destruction of ServiceWorkerObjectHost on
std::map::erase(). The new code takes the ownership of the object host
from the map first, and then erases the entry from the map. This
separates timings to erase the map entry and to destroy the object host,
so the crash should no longer happen.
Bug: 1056598
Change-Id: Id30654cb575bc557c42044d6f0c6f1f9bfaed613
---
diff --git a/content/browser/service_worker/service_worker_container_host.cc
b/content/browser/service_worker/service_worker_container_host.cc
index c631bcd..ff917f8 100644
--- a/content/browser/service_worker/service_worker_container_host.cc
+++ b/content/browser/service_worker/service_worker_container_host.cc
@@ -717,6 +717,16 @@
int64_t version_id) {
DCHECK_CURRENTLY_ON(ServiceWorkerContext::GetCoreThreadId());
DCHECK(base::Contains(service_worker_object_hosts_, version_id));
+
+ // ServiceWorkerObjectHost to be deleted may have the last reference to
+ // ServiceWorkerVersion that indirectly owns this ServiceWorkerContainerHost.
+ // If we erase the object host directly from the map, |this| could be deleted
+ // during the map operation and may crash. To avoid the case, we take the
+ // ownership of the object host from the map first, and then erase the entry
+ // from the map. See https://crbug.com/1056598 for details.
+ std::unique_ptr<ServiceWorkerObjectHost> to_be_deleted =
+ std::move(service_worker_object_hosts_[version_id]);
+ DCHECK(to_be_deleted);
service_worker_object_hosts_.erase(version_id);
}
diff --git
a/content/browser/service_worker/service_worker_object_host_unittest.cc
b/content/browser/service_worker/service_worker_object_host_unittest.cc
index 238cb8b..f60c7a2 100644
--- a/content/browser/service_worker/service_worker_object_host_unittest.cc
+++ b/content/browser/service_worker/service_worker_object_host_unittest.cc
@@ -200,6 +200,19 @@
return registration_info;
}
+ void CallOnConnectionError(ServiceWorkerContainerHost* container_host,
+ int64_t version_id) {
+ // ServiceWorkerObjectHost has the last reference to the version.
+ ServiceWorkerObjectHost* object_host =
+ GetServiceWorkerObjectHost(container_host, version_id);
+ EXPECT_TRUE(object_host->version_->HasOneRef());
+
+ // Make sure that OnConnectionError induces destruction of the version and
+ // the object host.
+ object_host->receivers_.Clear();
+ object_host->OnConnectionError();
+ }
+
BrowserTaskEnvironment task_environment_;
std::unique_ptr<EmbeddedWorkerTestHelper> helper_;
scoped_refptr<ServiceWorkerRegistration> registration_;
@@ -409,5 +422,30 @@
events[0]->source_info_for_client->client_type);
}
+// This is a regression test for https://crbug.com/1056598.
+TEST_F(ServiceWorkerObjectHostTest, OnConnectionError) {
+ const GURL scope("https://www.example.com/");
+ const GURL script_url("https://www.example.com/service_worker.js");
+ Initialize(std::make_unique<EmbeddedWorkerTestHelper>(base::FilePath()));
+ SetUpRegistration(scope, script_url);
+
+ // Create the provider host.
+ ASSERT_EQ(blink::ServiceWorkerStatusCode::kOk,
+ StartServiceWorker(version_.get()));
+
+ // Set up the case where the last reference to the version is owned by the
+ // service worker object host.
+ ServiceWorkerContainerHost* container_host =
+ version_->provider_host()->container_host();
+ ServiceWorkerVersion* version_rawptr = version_.get();
+ version_ = nullptr;
+ ASSERT_TRUE(version_rawptr->HasOneRef());
+
+ // Simulate the connection error that induces the object host destruction.
+ // This shouldn't crash.
+ CallOnConnectionError(container_host, version_rawptr->version_id());
+ base::RunLoop().RunUntilIdle();
+}
+
} // namespace service_worker_object_host_unittest
} // namespace content
++++++ chromium-83-gcc-template.patch ++++++
>From 8d115ddda495d0d2e1e1447392db6e9e6a8a1b32 Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <[email protected]>
Date: Tue, 07 Apr 2020 00:23:57 +0000
Subject: [PATCH] GCC: fix template specialization in WTF::VectorMover
GCC complains that explicit specialization in non-namespace scope
is happening for MoveOverlappingImpl. However, secialization is
not really necessary here with templates and can be moved
into MoveOverlappingImpl method without changing generated code.
Bug: 819294
Change-Id: I90b893b9701748302f7b900fbcc2c341685fe0d3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2126290
Reviewed-by: Kent Tamura <[email protected]>
Commit-Queue: Kent Tamura <[email protected]>
Cr-Commit-Position: refs/heads/master@{#756880}
---
diff --git a/third_party/blink/renderer/platform/wtf/vector.h
b/third_party/blink/renderer/platform/wtf/vector.h
index 632d308..82aaf96 100644
--- a/third_party/blink/renderer/platform/wtf/vector.h
+++ b/third_party/blink/renderer/platform/wtf/vector.h
@@ -205,30 +205,23 @@
}
}
- template <bool = Allocator::kIsGarbageCollected>
- static void MoveOverlappingImpl(const T* src, const T* src_end, T* dst);
- template <>
- static void MoveOverlappingImpl<false>(const T* src,
- const T* src_end,
- T* dst) {
- memmove(dst, src,
- reinterpret_cast<const char*>(src_end) -
- reinterpret_cast<const char*>(src));
- }
- template <>
- static void MoveOverlappingImpl<true>(const T* src,
- const T* src_end,
- T* dst) {
- if (src == dst)
- return;
- if (dst < src) {
- for (; src < src_end; ++src, ++dst)
- AtomicWriteMemcpy<sizeof(T)>(dst, src);
+ static void MoveOverlappingImpl(const T* src, const T* src_end, T* dst) {
+ if (Allocator::kIsGarbageCollected) {
+ if (src == dst)
+ return;
+ if (dst < src) {
+ for (; src < src_end; ++src, ++dst)
+ AtomicWriteMemcpy<sizeof(T)>(dst, src);
+ } else {
+ --src_end;
+ T* dst_end = dst + (src_end - src);
+ for (; src_end >= src; --src_end, --dst_end)
+ AtomicWriteMemcpy<sizeof(T)>(dst_end, src_end);
+ }
} else {
- --src_end;
- T* dst_end = dst + (src_end - src);
- for (; src_end >= src; --src_end, --dst_end)
- AtomicWriteMemcpy<sizeof(T)>(dst_end, src_end);
+ memmove(dst, src,
+ reinterpret_cast<const char*>(src_end) -
+ reinterpret_cast<const char*>(src));
}
}
++++++ chromium-83-icu67.patch ++++++
>From 3f8dc4b2e5baf77b463334c769af85b79d8c1463 Mon Sep 17 00:00:00 2001
From: Frank Tang <[email protected]>
Date: Fri, 03 Apr 2020 23:13:54 -0700
Subject: [PATCH] [intl] Remove soon-to-be removed getAllFieldPositions
Needed to land ICU67.1 soon.
Bug: v8:10393
Change-Id: I3c7737ca600d6ccfdc46ffaddfb318ce60bc7618
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2136489
Reviewed-by: Jakob Kummerow <[email protected]>
Commit-Queue: Frank Tang <[email protected]>
Cr-Commit-Position: refs/heads/master@{#67027}
---
diff --git a/v8/src/objects/js-number-format.cc
b/v8/src/objects/js-number-format.cc
index ad831c5..bcd4403 100644
--- a/v8/src/objects/js-number-format.cc
+++ b/v8/src/objects/js-number-format.cc
@@ -1241,44 +1241,33 @@
}
namespace {
-Maybe<icu::UnicodeString> IcuFormatNumber(
+Maybe<bool> IcuFormatNumber(
Isolate* isolate,
const icu::number::LocalizedNumberFormatter& number_format,
- Handle<Object> numeric_obj, icu::FieldPositionIterator* fp_iter) {
+ Handle<Object> numeric_obj, icu::number::FormattedNumber* formatted) {
// If it is BigInt, handle it differently.
UErrorCode status = U_ZERO_ERROR;
- icu::number::FormattedNumber formatted;
if (numeric_obj->IsBigInt()) {
Handle<BigInt> big_int = Handle<BigInt>::cast(numeric_obj);
Handle<String> big_int_string;
ASSIGN_RETURN_ON_EXCEPTION_VALUE(isolate, big_int_string,
BigInt::ToString(isolate, big_int),
- Nothing<icu::UnicodeString>());
- formatted = number_format.formatDecimal(
+ Nothing<bool>());
+ *formatted = number_format.formatDecimal(
{big_int_string->ToCString().get(), big_int_string->length()}, status);
} else {
double number = numeric_obj->IsNaN()
? std::numeric_limits<double>::quiet_NaN()
: numeric_obj->Number();
- formatted = number_format.formatDouble(number, status);
+ *formatted = number_format.formatDouble(number, status);
}
if (U_FAILURE(status)) {
// This happen because of icu data trimming trim out "unit".
// See https://bugs.chromium.org/p/v8/issues/detail?id=8641
- THROW_NEW_ERROR_RETURN_VALUE(isolate,
- NewTypeError(MessageTemplate::kIcuError),
- Nothing<icu::UnicodeString>());
+ THROW_NEW_ERROR_RETURN_VALUE(
+ isolate, NewTypeError(MessageTemplate::kIcuError), Nothing<bool>());
}
- if (fp_iter) {
- formatted.getAllFieldPositions(*fp_iter, status);
- }
- icu::UnicodeString result = formatted.toString(status);
- if (U_FAILURE(status)) {
- THROW_NEW_ERROR_RETURN_VALUE(isolate,
- NewTypeError(MessageTemplate::kIcuError),
- Nothing<icu::UnicodeString>());
- }
- return Just(result);
+ return Just(true);
}
} // namespace
@@ -1289,10 +1278,16 @@
Handle<Object> numeric_obj) {
DCHECK(numeric_obj->IsNumeric());
- Maybe<icu::UnicodeString> maybe_format =
- IcuFormatNumber(isolate, number_format, numeric_obj, nullptr);
+ icu::number::FormattedNumber formatted;
+ Maybe<bool> maybe_format =
+ IcuFormatNumber(isolate, number_format, numeric_obj, &formatted);
MAYBE_RETURN(maybe_format, Handle<String>());
- return Intl::ToString(isolate, maybe_format.FromJust());
+ UErrorCode status = U_ZERO_ERROR;
+ icu::UnicodeString result = formatted.toString(status);
+ if (U_FAILURE(status)) {
+ THROW_NEW_ERROR(isolate, NewTypeError(MessageTemplate::kIcuError), String);
+ }
+ return Intl::ToString(isolate, result);
}
namespace {
@@ -1405,12 +1400,18 @@
}
namespace {
-Maybe<int> ConstructParts(Isolate* isolate, const icu::UnicodeString&
formatted,
- icu::FieldPositionIterator* fp_iter,
+Maybe<int> ConstructParts(Isolate* isolate,
+ icu::number::FormattedNumber* formatted,
Handle<JSArray> result, int start_index,
Handle<Object> numeric_obj, bool style_is_unit) {
+ UErrorCode status = U_ZERO_ERROR;
+ icu::UnicodeString formatted_text = formatted->toString(status);
+ if (U_FAILURE(status)) {
+ THROW_NEW_ERROR_RETURN_VALUE(
+ isolate, NewTypeError(MessageTemplate::kIcuError), Nothing<int>());
+ }
DCHECK(numeric_obj->IsNumeric());
- int32_t length = formatted.length();
+ int32_t length = formatted_text.length();
int index = start_index;
if (length == 0) return Just(index);
@@ -1419,13 +1420,14 @@
// other region covers some part of the formatted string. It's possible
// there's another field with exactly the same begin and end as this
backdrop,
// in which case the backdrop's field_id of -1 will give it lower priority.
- regions.push_back(NumberFormatSpan(-1, 0, formatted.length()));
+ regions.push_back(NumberFormatSpan(-1, 0, formatted_text.length()));
{
- icu::FieldPosition fp;
- while (fp_iter->next(fp)) {
- regions.push_back(NumberFormatSpan(fp.getField(), fp.getBeginIndex(),
- fp.getEndIndex()));
+ icu::ConstrainedFieldPosition cfp;
+ cfp.constrainCategory(UFIELD_CATEGORY_NUMBER);
+ while (formatted->nextPosition(cfp, status)) {
+ regions.push_back(
+ NumberFormatSpan(cfp.getField(), cfp.getStart(), cfp.getLimit()));
}
}
@@ -1447,7 +1449,7 @@
Handle<String> substring;
ASSIGN_RETURN_ON_EXCEPTION_VALUE(
isolate, substring,
- Intl::ToString(isolate, formatted, part.begin_pos, part.end_pos),
+ Intl::ToString(isolate, formatted_text, part.begin_pos, part.end_pos),
Nothing<int>());
Intl::AddElement(isolate, result, index, field_type_string, substring);
++index;
@@ -1467,20 +1469,19 @@
number_format->icu_number_formatter().raw();
CHECK_NOT_NULL(fmt);
- icu::FieldPositionIterator fp_iter;
- Maybe<icu::UnicodeString> maybe_format =
- IcuFormatNumber(isolate, *fmt, numeric_obj, &fp_iter);
+ icu::number::FormattedNumber formatted;
+ Maybe<bool> maybe_format =
+ IcuFormatNumber(isolate, *fmt, numeric_obj, &formatted);
MAYBE_RETURN(maybe_format, Handle<JSArray>());
-
UErrorCode status = U_ZERO_ERROR;
+
bool style_is_unit =
Style::UNIT == StyleFromSkeleton(fmt->toSkeleton(status));
CHECK(U_SUCCESS(status));
Handle<JSArray> result = factory->NewJSArray(0);
- Maybe<int> maybe_format_to_parts =
- ConstructParts(isolate, maybe_format.FromJust(), &fp_iter, result, 0,
- numeric_obj, style_is_unit);
+ Maybe<int> maybe_format_to_parts = ConstructParts(
+ isolate, &formatted, result, 0, numeric_obj, style_is_unit);
MAYBE_RETURN(maybe_format_to_parts, Handle<JSArray>());
return result;
++++++ chromium-browser.desktop ++++++
[Desktop Entry]
Version=1.0
Name=Chromium
Comment=Browse the World Wide Web
GenericName=Web Browser
Exec=chromium %u
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=chromium-browser
Categories=Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https;
StartupWMClass=Chromium
++++++ chromium-browser.sh ++++++
#!/bin/sh
# Chromium launcher
# Authors:
# Fabien Tassin <[email protected]>
# License: GPLv2 or later
APPNAME=chromium
LIBDIR=/usr/lib/chromium
GDB=/usr/bin/gdb
usage () {
echo "$APPNAME [-h|--help] [-g|--debug] [options] [URL]"
echo
echo " -g or --debug Start within $GDB"
echo " -h or --help This help screen"
}
# FFmpeg needs to know where its libs are located
if [ "Z$LD_LIBRARY_PATH" != Z ] ; then
LD_LIBRARY_PATH=$LIBDIR:$LD_LIBRARY_PATH
else
LD_LIBRARY_PATH=$LIBDIR
fi
export LD_LIBRARY_PATH
# in case chromium runs in a Wayland session ensure GTK falls back to X11
# if we are in a X-session, there is no difference
export GDK_BACKEND=x11
# xdg-settings should in PATH
PATH=$PATH:$LIBDIR
export PATH
want_debug=0
while [ $# -gt 0 ]; do
case "$1" in
-h | --help | -help )
usage
exit 0 ;;
-g | --debug )
want_debug=1
shift ;;
-- ) # Stop option prcessing
shift
break ;;
* )
break ;;
esac
done
# Setup the default profile if this is none
# Set the default theme as GTK+ with system window decoration
if [ ! -d ~/.config/chromium/Default ]; then
mkdir -p ~/.config/chromium/Default
cp /etc/chromium/master_preferences ~/.config/chromium/Default/Preferences
fi
# Allow users to override command-line options
# Based on Gentoo's chromium package (and by extension, Debian's)
if [ -f /etc/default/chromium ]; then
. /etc/default/chromium
fi
# Detect if PepperFlash has been installed (based on the package in packman)
# If so, automatically enable it
if [ -f /usr/lib/chromium/PepperFlash/libpepflashplayer.so ]; then
PEPPER_FLASH_VERSION=$(grep '"version":'
/usr/lib/chromium/PepperFlash/manifest.json| grep -Po '(?<=version":
")(?:\d|\.)*')
PEPPERFLASH="--ppapi-flash-path=/usr/lib/chromium/PepperFlash/libpepflashplayer.so
--ppapi-flash-version=$PEPPER_FLASH_VERSION"
fi
# Prefer user defined CHROMIUM_USER_FLAGS (from env) over system
# default CHROMIUM_FLAGS (from /etc/chromium/default)
CHROMIUM_FLAGS=${CHROMIUM_USER_FLAGS:-$CHROMIUM_FLAGS}
if [ $want_debug -eq 1 ] ; then
if [ ! -x $GDB ] ; then
echo "Sorry, can't find usable $GDB. Please install it."
exit 1
fi
tmpfile=`mktemp /tmp/chromiumargs.XXXXXX` || { echo "Cannot create temporary
file" >&2; exit 1; }
trap " [ -f \"$tmpfile\" ] && /bin/rm -f -- \"$tmpfile\"" 0 1 2 3 13 15
echo "set args ${1+"$@"}" > $tmpfile
echo "# Env:"
echo "# LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
echo "$GDB $LIBDIR/$APPNAME -x $tmpfile"
$GDB "$LIBDIR/$APPNAME" -x $tmpfile
exit $?
else
exec $LIBDIR/$APPNAME ${PEPPERFLASH} "--password-store=detect"
"--enable-threaded-compositing" "--ui-disable-partial-swap" ${CHROMIUM_FLAGS}
"$@"
fi
++++++ chromium-browser.xml ++++++
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE default-apps SYSTEM "gnome-da-list.dtd">
<default-apps>
<web-browsers>
<web-browser>
<name>Chromium</name>
<executable>chromium</executable>
<command>chromium %s</command>
<icon-name>chromium-browser</icon-name>
<run-in-terminal>false</run-in-terminal>
<netscape-remote>true</netscape-remote>
<tab-command>false</tab-command>
<win-command>false</win-command>
</web-browser>
</web-browsers>
</default-apps>
++++++ chromium-buildname.patch ++++++
Index: chromium-73.0.3683.27/components/version_ui_strings.grdp
===================================================================
--- chromium-73.0.3683.27.orig/components/version_ui_strings.grdp
+++ chromium-73.0.3683.27/components/version_ui_strings.grdp
@@ -7,7 +7,7 @@
Official Build
</message>
<message name="IDS_VERSION_UI_UNOFFICIAL" desc="unofficial build on the
about:version page">
- Developer Build
+ openSUSE Build
</message>
<message name="IDS_VERSION_UI_32BIT" desc="32-bit on the chrome://version
page">
(32-bit)
++++++ chromium-dma-buf.patch ++++++
Index: chromium-79.0.3941.4/ui/gfx/linux/client_native_pixmap_dmabuf.cc
===================================================================
--- chromium-79.0.3941.4.orig/ui/gfx/linux/client_native_pixmap_dmabuf.cc
+++ chromium-79.0.3941.4/ui/gfx/linux/client_native_pixmap_dmabuf.cc
@@ -25,9 +25,6 @@
#include "ui/gfx/buffer_format_util.h"
#include "ui/gfx/switches.h"
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
-#include <linux/dma-buf.h>
-#else
#include <linux/types.h>
struct dma_buf_sync {
@@ -42,7 +39,6 @@ struct dma_buf_sync {
#define DMA_BUF_BASE 'b'
#define DMA_BUF_IOCTL_SYNC _IOW(DMA_BUF_BASE, 0, struct dma_buf_sync)
-#endif
namespace gfx {
++++++ chromium-drm.patch ++++++
Index: chromium-76.0.3800.0/ui/gfx/native_pixmap_handle.cc
===================================================================
--- chromium-76.0.3800.0.orig/ui/gfx/native_pixmap_handle.cc
+++ chromium-76.0.3800.0/ui/gfx/native_pixmap_handle.cc
@@ -21,6 +21,9 @@
namespace gfx {
#if defined(OS_LINUX)
+#ifndef DRM_FORMAT_MOD_INVALID
+#define DRM_FORMAT_MOD_INVALID ((1ULL<<56) - 1)
+#endif
static_assert(NativePixmapHandle::kNoModifier == DRM_FORMAT_MOD_INVALID,
"gfx::NativePixmapHandle::kNoModifier should be an alias for"
"DRM_FORMAT_MOD_INVALID");
++++++ chromium-fix-char_traits.patch ++++++
--- a/base/strings/char_traits.h
+++ b/base/strings/char_traits.h
@@ -67,9 +67,9 @@
return __builtin_memcmp(s1, s2, n);
#else
for (; n; --n, ++s1, ++s2) {
- if (*s1 < *s2)
+ if ((unsigned char)*s1 < (unsigned char)*s2)
return -1;
- if (*s1 > *s2)
+ if ((unsigned char)*s1 > (unsigned char)*s2)
return 1;
}
return 0;
++++++ chromium-libusb_interrupt_event_handler.patch ++++++
diff -up
chromium-48.0.2564.116/services/device/usb/usb_context.cc.modern-libusbx
chromium-48.0.2564.116/device/usb/usb_context.cc
--- chromium-48.0.2564.116/services/device/usb/usb_context.cc.modern-libusbx
2016-02-24 10:21:10.534996028 -0500
+++ chromium-48.0.2564.116/services/device/usb/usb_context.cc 2016-02-24
10:22:28.270499864 -0500
@@ -57,7 +57,11 @@ void UsbContext::UsbEventHandler::Run()
void UsbContext::UsbEventHandler::Stop() {
base::subtle::Release_Store(&running_, 0);
+#ifdef LIBUSB_API_VERSION >= 0x01000105
+ libusb_interrupt_event_handler(context_);
+#else
libusb_interrupt_handle_event(context_);
+#endif
}
UsbContext::UsbContext(PlatformUsbContext context) : context_(context) {
++++++ chromium-master-prefs-path.patch ++++++
Index: chromium-68.0.3423.2/chrome/browser/first_run/first_run_internal_linux.cc
===================================================================
---
chromium-68.0.3423.2.orig/chrome/browser/first_run/first_run_internal_linux.cc
+++ chromium-68.0.3423.2/chrome/browser/first_run/first_run_internal_linux.cc
@@ -20,8 +20,7 @@ bool IsOrganicFirstRun() {
base::FilePath MasterPrefsPath() {
// The standard location of the master prefs is next to the chrome binary.
base::FilePath master_prefs;
- if (!base::PathService::Get(base::DIR_EXE, &master_prefs))
- return base::FilePath();
+ master_prefs = base::FilePath("/etc/chromium");
return master_prefs.AppendASCII(installer::kDefaultMasterPrefs);
}
++++++ chromium-norar.patch ++++++
Index: chromium-83.0.4103.61/chrome/common/safe_browsing/BUILD.gn
===================================================================
--- chromium-83.0.4103.61.orig/chrome/common/safe_browsing/BUILD.gn
+++ chromium-83.0.4103.61/chrome/common/safe_browsing/BUILD.gn
@@ -57,39 +57,6 @@ if (safe_browsing_mode == 1) {
public_deps = [ "//components/safe_browsing/core:csd_proto" ]
}
- source_set("rar_analyzer") {
- sources = [
- "rar_analyzer.cc",
- "rar_analyzer.h",
- ]
-
- deps = [
- ":archive_analyzer_results",
- ":download_type_util",
- "//base",
- "//base:i18n",
- "//components/safe_browsing/core:features",
- "//components/safe_browsing/core:file_type_policies",
- "//third_party/unrar:unrar",
- ]
-
- defines = [
- "_FILE_OFFSET_BITS=64",
- "LARGEFILE_SOURCE",
- "RAR_SMP",
- "SILENT",
-
- # The following is set to disable certain macro definitions in the unrar
- # source code.
- "CHROMIUM_UNRAR",
-
- # Disables exceptions in unrar, replaces them with process termination.
- "UNRAR_NO_EXCEPTIONS",
- ]
-
- public_deps = [ "//components/safe_browsing/core:csd_proto" ]
- }
-
source_set("disk_image_type_sniffer_mac") {
sources = [
"disk_image_type_sniffer_mac.cc",
@@ -156,7 +123,6 @@ source_set("safe_browsing") {
":archive_analyzer_results",
":binary_feature_extractor",
":download_type_util",
- ":rar_analyzer",
"//components/safe_browsing/core:features",
]
Index: chromium-83.0.4103.61/chrome/common/safe_browsing/DEPS
===================================================================
--- chromium-83.0.4103.61.orig/chrome/common/safe_browsing/DEPS
+++ chromium-83.0.4103.61/chrome/common/safe_browsing/DEPS
@@ -1,6 +1,5 @@
include_rules = [
"+components/safe_browsing",
"+third_party/protobuf",
- "+third_party/unrar",
"+third_party/zlib",
]
Index: chromium-83.0.4103.61/chrome/services/file_util/safe_archive_analyzer.cc
===================================================================
---
chromium-83.0.4103.61.orig/chrome/services/file_util/safe_archive_analyzer.cc
+++ chromium-83.0.4103.61/chrome/services/file_util/safe_archive_analyzer.cc
@@ -46,10 +46,14 @@ void SafeArchiveAnalyzer::AnalyzeDmgFile
void SafeArchiveAnalyzer::AnalyzeRarFile(base::File rar_file,
base::File temporary_file,
AnalyzeRarFileCallback callback) {
+#if 0
DCHECK(rar_file.IsValid());
safe_browsing::ArchiveAnalyzerResults results;
safe_browsing::rar_analyzer::AnalyzeRarFile(
std::move(rar_file), std::move(temporary_file), &results);
std::move(callback).Run(results);
+#else
+ NOTREACHED();
+#endif
}
++++++ chromium-prop-codecs.patch ++++++
Index: chromium-83.0.4103.61/media/BUILD.gn
===================================================================
--- chromium-83.0.4103.61.orig/media/BUILD.gn
+++ chromium-83.0.4103.61/media/BUILD.gn
@@ -45,12 +45,6 @@ buildflag_header("media_buildflags") {
]
}
-if (proprietary_codecs && media_use_ffmpeg) {
- assert(
- ffmpeg_branding != "Chromium",
- "proprietary codecs and ffmpeg_branding set to Chromium are
incompatible")
-}
-
# Common configuration for targets in the media directory; these must not be
# exported since things like USE_NEON and USE_CRAS have different meanings
# elsewhere in the code base.
Index: chromium-83.0.4103.61/third_party/webrtc/webrtc.gni
===================================================================
--- chromium-83.0.4103.61.orig/third_party/webrtc/webrtc.gni
+++ chromium-83.0.4103.61/third_party/webrtc/webrtc.gni
@@ -152,8 +152,7 @@ declare_args() {
#
# Enabling H264 when building with MSVC is currently not supported, see
# bugs.webrtc.org/9213#c13 for more info.
- rtc_use_h264 =
- proprietary_codecs && !is_android && !is_ios && !(is_win && !is_clang)
+ rtc_use_h264 = false
# By default, use normal platform audio support or dummy audio, but don't
# use file-based audio playout and record.
++++++ chromium-system-libusb.patch ++++++
Index: chromium-70.0.3538.54/build/linux/unbundle/libusb.gn
===================================================================
--- /dev/null
+++ chromium-70.0.3538.54/build/linux/unbundle/libusb.gn
@@ -0,0 +1,24 @@
+# Copyright 2016 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/config/linux/pkg_config.gni")
+import("//build/shim_headers.gni")
+
+pkg_config("system_libusb") {
+ packages = [ "libusb-1.0" ]
+}
+
+shim_headers("libusb_shim") {
+ root_path = "src/libusb"
+ headers = [
+ "libusb.h",
+ ]
+}
+
+source_set("libusb") {
+ deps = [
+ ":libusb_shim",
+ ]
+ public_configs = [ ":system_libusb" ]
+}
Index: chromium-70.0.3538.54/build/linux/unbundle/replace_gn_files.py
===================================================================
--- chromium-70.0.3538.54.orig/build/linux/unbundle/replace_gn_files.py
+++ chromium-70.0.3538.54/build/linux/unbundle/replace_gn_files.py
@@ -27,6 +27,7 @@ REPLACEMENTS = {
'libevent': 'base/third_party/libevent/BUILD.gn',
'libjpeg': 'third_party/libjpeg.gni',
'libpng': 'third_party/libpng/BUILD.gn',
+ 'libusb': 'third_party/libusb/BUILD.gn',
'libvpx': 'third_party/libvpx/BUILD.gn',
'libwebp': 'third_party/libwebp/BUILD.gn',
'libxml': 'third_party/libxml/BUILD.gn',
++++++ chromium-vaapi-fix.patch ++++++
description: fix vaapi with vdpau
author: Maxim Baz
origin: chromium-vaapi patches from Arch linux
Index: chromium-81.0.4044.43/media/gpu/vaapi/vaapi_video_decode_accelerator.cc
===================================================================
--- chromium-81.0.4044.43.orig/media/gpu/vaapi/vaapi_video_decode_accelerator.cc
+++ chromium-81.0.4044.43/media/gpu/vaapi/vaapi_video_decode_accelerator.cc
@@ -712,6 +712,7 @@ void VaapiVideoDecodeAccelerator::Assign
// |vpp_vaapi_wrapper_| for VaapiPicture to DownloadFromSurface() the VA's
// internal decoded frame.
if (buffer_allocation_mode_ != BufferAllocationMode::kNone &&
+ buffer_allocation_mode_ != BufferAllocationMode::kWrapVdpau &&
!vpp_vaapi_wrapper_) {
vpp_vaapi_wrapper_ = VaapiWrapper::Create(
VaapiWrapper::kVideoProcess, VAProfileNone,
@@ -743,7 +744,8 @@ void VaapiVideoDecodeAccelerator::Assign
: gfx::Size();
std::unique_ptr<VaapiPicture> picture = vaapi_picture_factory_->Create(
- (buffer_allocation_mode_ == BufferAllocationMode::kNone)
+ ((buffer_allocation_mode_ == BufferAllocationMode::kNone) ||
+ (buffer_allocation_mode_ == BufferAllocationMode::kWrapVdpau))
? vaapi_wrapper_
: vpp_vaapi_wrapper_,
make_context_current_cb_, bind_image_cb_, buffer, size_to_bind);
@@ -1199,6 +1201,14 @@ VaapiVideoDecodeAccelerator::GetSupporte
VaapiVideoDecodeAccelerator::BufferAllocationMode
VaapiVideoDecodeAccelerator::DecideBufferAllocationMode() {
+ // NVIDIA blobs use VDPAU
+ if (base::StartsWith(VaapiWrapper::GetVendorString(),
+ "Splitted-Desktop Systems VDPAU",
+ base::CompareCase::SENSITIVE)) {
+ LOG(INFO) << "VA-API driver on VDPAU backend";
+ return BufferAllocationMode::kWrapVdpau;
+ }
+
// TODO(crbug.com/912295): Enable a better BufferAllocationMode for IMPORT
// |output_mode_| as well.
if (output_mode_ == VideoDecodeAccelerator::Config::OutputMode::IMPORT)
@@ -1211,7 +1221,7 @@ VaapiVideoDecodeAccelerator::DecideBuffe
// depends on the bitstream and sometimes it's not enough to cover the amount
// of frames needed by the client pipeline (see b/133733739).
// TODO(crbug.com/911754): Enable for VP9 Profile 2.
- if (IsGeminiLakeOrLater() &&
+ if (false && IsGeminiLakeOrLater() &&
(profile_ == VP9PROFILE_PROFILE0 || profile_ == VP8PROFILE_ANY)) {
// Add one to the reference frames for the one being currently egressed,
and
// an extra allocation for both |client_| and |decoder_|, see
Index: chromium-81.0.4044.43/media/gpu/vaapi/vaapi_video_decode_accelerator.h
===================================================================
--- chromium-81.0.4044.43.orig/media/gpu/vaapi/vaapi_video_decode_accelerator.h
+++ chromium-81.0.4044.43/media/gpu/vaapi/vaapi_video_decode_accelerator.h
@@ -208,6 +208,7 @@ class MEDIA_GPU_EXPORT VaapiVideoDecodeA
// Using |client_|s provided PictureBuffers and as many internally
// allocated.
kNormal,
+ kWrapVdpau,
};
// Decides the concrete buffer allocation mode, depending on the hardware
Index: chromium-81.0.4044.43/media/gpu/vaapi/vaapi_wrapper.cc
===================================================================
--- chromium-81.0.4044.43.orig/media/gpu/vaapi/vaapi_wrapper.cc
+++ chromium-81.0.4044.43/media/gpu/vaapi/vaapi_wrapper.cc
@@ -1137,6 +1137,11 @@ VAImplementation VaapiWrapper::GetImplem
}
// static
+const std::string& VaapiWrapper::GetVendorString() {
+ return VADisplayState::Get()->va_vendor_string();
+}
+
+// static
scoped_refptr<VaapiWrapper> VaapiWrapper::Create(
CodecMode mode,
VAProfile va_profile,
Index: chromium-81.0.4044.43/media/gpu/vaapi/vaapi_wrapper.h
===================================================================
--- chromium-81.0.4044.43.orig/media/gpu/vaapi/vaapi_wrapper.h
+++ chromium-81.0.4044.43/media/gpu/vaapi/vaapi_wrapper.h
@@ -119,6 +119,9 @@ class MEDIA_GPU_EXPORT VaapiWrapper
// Returns the type of the underlying VA-API implementation.
static VAImplementation GetImplementationType();
+ // Returns the VAAPI vendor string (obtained using vaQueryVendorString()).
+ static const std::string& GetVendorString();
+
// Return an instance of VaapiWrapper initialized for |va_profile| and
// |mode|. |report_error_to_uma_cb| will be called independently from
// reporting errors to clients via method return values.
++++++ chromium-vaapi.patch ++++++
Index: chromium-83.0.4100.3/chrome/browser/about_flags.cc
===================================================================
--- chromium-83.0.4100.3.orig/chrome/browser/about_flags.cc
+++ chromium-83.0.4100.3/chrome/browser/about_flags.cc
@@ -2128,7 +2128,7 @@ const FeatureEntry kFeatureEntries[] = {
"disable-accelerated-video-decode",
flag_descriptions::kAcceleratedVideoDecodeName,
flag_descriptions::kAcceleratedVideoDecodeDescription,
- kOsMac | kOsWin | kOsCrOS | kOsAndroid,
+ kOsMac | kOsWin | kOsCrOS | kOsAndroid | kOsLinux,
SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
},
{
@@ -2560,10 +2560,10 @@ const FeatureEntry kFeatureEntries[] = {
flag_descriptions::kWebXrForceRuntimeDescription, kOsDesktop,
MULTI_VALUE_TYPE(kWebXrForceRuntimeChoices)},
#endif // ENABLE_VR
-#if defined(OS_CHROMEOS)
+#if defined(OS_CHROMEOS) || defined(OS_LINUX)
{"disable-accelerated-mjpeg-decode",
flag_descriptions::kAcceleratedMjpegDecodeName,
- flag_descriptions::kAcceleratedMjpegDecodeDescription, kOsCrOS,
+ flag_descriptions::kAcceleratedMjpegDecodeDescription, kOsCrOS | kOsLinux,
SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedMjpegDecode)},
#endif // OS_CHROMEOS
{"system-keyboard-lock", flag_descriptions::kSystemKeyboardLockName,
Index: chromium-83.0.4100.3/chrome/browser/flag_descriptions.cc
===================================================================
--- chromium-83.0.4100.3.orig/chrome/browser/flag_descriptions.cc
+++ chromium-83.0.4100.3/chrome/browser/flag_descriptions.cc
@@ -2967,15 +2967,20 @@ const char kMetalDescription[] =
#endif
-// Chrome OS
-------------------------------------------------------------------
+// Chrome OS &
Linux------------------------------------------------------------
-#if defined(OS_CHROMEOS)
+#if defined(OS_CHROMEOS) || (defined(OS_LINUX) && !defined(OS_ANDROID))
const char kAcceleratedMjpegDecodeName[] =
"Hardware-accelerated mjpeg decode for captured frame";
const char kAcceleratedMjpegDecodeDescription[] =
"Enable hardware-accelerated mjpeg decode for captured frame where "
"available.";
+#endif
+
+// Chrome OS
-------------------------------------------------------------------
+
+#if defined(OS_CHROMEOS)
const char kAggregatedMlAppRankingName[] = "Rank suggested apps with ML.";
const char kAggregatedMlAppRankingDescription[] =
Index: chromium-83.0.4100.3/chrome/browser/flag_descriptions.h
===================================================================
--- chromium-83.0.4100.3.orig/chrome/browser/flag_descriptions.h
+++ chromium-83.0.4100.3/chrome/browser/flag_descriptions.h
@@ -1705,11 +1705,15 @@ extern const char kMetalDescription[];
// Chrome OS ------------------------------------------------------------------
-#if defined(OS_CHROMEOS)
+#if defined(OS_CHROMEOS) || (defined(OS_LINUX) && !defined(OS_ANDROID))
extern const char kAcceleratedMjpegDecodeName[];
extern const char kAcceleratedMjpegDecodeDescription[];
+#endif
+
+#if defined(OS_CHROMEOS)
+
extern const char kAggregatedMlAppRankingName[];
extern const char kAggregatedMlAppRankingDescription[];
Index: chromium-83.0.4100.3/gpu/config/software_rendering_list.json
===================================================================
--- chromium-83.0.4100.3.orig/gpu/config/software_rendering_list.json
+++ chromium-83.0.4100.3/gpu/config/software_rendering_list.json
@@ -337,7 +337,7 @@
},
{
"id": 48,
- "description": "Accelerated video decode is unavailable on Linux",
+ "description": "Accelerated VA-API video decode is not supported on
NVIDIA platforms",
"cr_bugs": [137247, 1032907],
"os": {
"type": "linux"
@@ -347,6 +347,7 @@
"machine_model_name": ["Chromecast"]
}
],
+ "vendor_id": "0x10de",
"features": [
"accelerated_video_decode"
]
Index: chromium-83.0.4100.3/media/gpu/test/BUILD.gn
===================================================================
--- chromium-83.0.4100.3.orig/media/gpu/test/BUILD.gn
+++ chromium-83.0.4100.3/media/gpu/test/BUILD.gn
@@ -179,7 +179,7 @@ if (use_vaapi || use_v4l2_codec) {
}
}
-if (is_chromeos) {
+if (is_chromeos || use_vaapi) {
static_library("local_gpu_memory_buffer_manager") {
testonly = true
sources = [
Index: chromium-83.0.4100.3/media/mojo/services/gpu_mojo_media_client.cc
===================================================================
--- chromium-83.0.4100.3.orig/media/mojo/services/gpu_mojo_media_client.cc
+++ chromium-83.0.4100.3/media/mojo/services/gpu_mojo_media_client.cc
@@ -167,7 +167,7 @@ GpuMojoMediaClient::GetSupportedVideoDec
*d3d11_supported_configs_;
}
-#elif BUILDFLAG(USE_CHROMEOS_MEDIA_ACCELERATION)
+#elif defined(OS_CHROMEOS) && BUILDFLAG(USE_CHROMEOS_MEDIA_ACCELERATION)
if (IsNewAcceleratedVideoDecoderUsed(gpu_preferences_)) {
if (!cros_supported_configs_) {
cros_supported_configs_ =
++++++ chromium.default ++++++
# Default settings for chromium. This file is sourced by /usr/bin/chromium
# Options to pass to chromium
# Ie. debugging: --enable-logging=stderr --v=2
CHROMIUM_FLAGS=""
++++++ exclude_ymp.patch ++++++
--- a/third_party/blink/common/mime_util/mime_util.cc 2013-08-25
10:12:05.428599992 +0200
+++ b/third_party/blink/common/mime_util/mime_util.cc 2013-08-25
10:12:05.428599992 +0200
@@ -79,6 +79,7 @@
"text/x-csv",
"text/x-vcf",
"text/rtf",
+ "text/x-suse-ymp",
"text/comma-separated-values",
"text/csv",
"text/tab-separated-values",
++++++ fix_building_widevinecdm_with_chromium.patch ++++++
Index: chromium-79.0.3941.4/third_party/widevine/cdm/widevine_cdm_version.h
===================================================================
--- chromium-79.0.3941.4.orig/third_party/widevine/cdm/widevine_cdm_version.h
+++ chromium-79.0.3941.4/third_party/widevine/cdm/widevine_cdm_version.h
@@ -11,5 +11,6 @@
// If the Widevine CDM is available define the following:
// - WIDEVINE_CDM_VERSION_STRING (with the version of the CDM that's available
// as a string, e.g., "1.0.123.456").
+#define WIDEVINE_CDM_VERSION_STRING "unknown"
#endif // WIDEVINE_CDM_VERSION_H_
++++++ gcc-enable-lto.patch ++++++
Index: chromium-75.0.3770.142/build/config/BUILDCONFIG.gn
===================================================================
--- chromium-75.0.3770.142.orig/build/config/BUILDCONFIG.gn
+++ chromium-75.0.3770.142/build/config/BUILDCONFIG.gn
@@ -130,6 +130,8 @@ declare_args() {
# separate flags.
is_official_build = false
+ gcc_lto = false
+
# Whether we're a traditional desktop unix.
is_desktop_linux = current_os == "linux"
@@ -440,6 +442,12 @@ default_compiler_configs = [
"//build/config/sanitizers:default_sanitizer_flags",
]
+if (gcc_lto) {
+ default_compiler_configs += [
+ "//build/config/compiler:gcc_lto",
+ ]
+}
+
if (is_win) {
default_compiler_configs += [
"//build/config/win:default_crt",
Index: chromium-75.0.3770.142/build/config/compiler/BUILD.gn
===================================================================
--- chromium-75.0.3770.142.orig/build/config/compiler/BUILD.gn
+++ chromium-75.0.3770.142/build/config/compiler/BUILD.gn
@@ -1921,6 +1921,10 @@ if (is_win) {
}
}
+config("gcc_lto") {
+ cflags = [ "-flto" ]
+}
+
config("default_stack_frames") {
if (is_posix || is_fuchsia) {
if (enable_frame_pointers) {
Index: chromium-75.0.3770.142/sandbox/linux/BUILD.gn
===================================================================
--- chromium-75.0.3770.142.orig/sandbox/linux/BUILD.gn
+++ chromium-75.0.3770.142/sandbox/linux/BUILD.gn
@@ -256,6 +256,9 @@ component("seccomp_bpf") {
"//base",
"//base/third_party/dynamic_annotations",
]
+ if (gcc_lto) {
+ configs -= [ "//build/config/compiler:gcc_lto" ]
+ }
if (is_nacl_nonsfi) {
cflags = [ "-fgnu-inline-asm" ]
++++++ gpu-timeout.patch ++++++
description: 10 seconds may not be enough, so don't kill the gpu process until
20.
author: Chad MILLER <[email protected]>
bug-debian: http://bugs.debian.org/781940
Index: chromium-81.0.4040.5/gpu/ipc/service/gpu_watchdog_thread.cc
===================================================================
--- chromium-81.0.4040.5.orig/gpu/ipc/service/gpu_watchdog_thread.cc
+++ chromium-81.0.4040.5/gpu/ipc/service/gpu_watchdog_thread.cc
@@ -39,7 +39,7 @@ const int kGpuTimeout = 30000;
// hangs at context creation during startup. See https://crbug.com/918490.
const int kGpuTimeout = 15000;
#else
-const int kGpuTimeout = 10000;
+const int kGpuTimeout = 20000;
#endif
// The same set of timeouts from Watchdog V2 so we can compare the results
++++++ master_preferences ++++++
{
"distribution": {
"skip_first_run_ui": true,
"alternate_shortcut_text": false,
"oem_bubble": true,
"chrome_shortcut_icon_index": 0,
"create_all_shortcuts": true,
"show_welcome_page": true,
"make_chrome_default": false,
"make_chrome_default_for_user": false,
"system_level": false,
"verbose_logging": false
},
"download": {
"extensions_to_open": "ymp"
},
"browser": {
"show_home_button": true,
"check_default_browser": false
},
"bookmark_bar": {
"show_on_all_tabs": true
},
"first_run_tabs": [
"https://www.opensuse.org/searchPage/",
"https://www.google.com/chrome/browser/welcome.html"
],
"homepage": "https://www.opensuse.org/searchPage/",
"homepage_is_newtabpage": false
}
++++++ no-location-leap151.patch ++++++
Index: chromium-83.0.4103.97/base/location.h
===================================================================
--- chromium-83.0.4103.97.orig/base/location.h
+++ chromium-83.0.4103.97/base/location.h
@@ -18,12 +18,7 @@
namespace base {
-#if defined(__has_builtin)
-// Clang allows detection of these builtins.
-#define SUPPORTS_LOCATION_BUILTINS \
- (__has_builtin(__builtin_FUNCTION) && __has_builtin(__builtin_FILE) && \
- __has_builtin(__builtin_LINE))
-#elif defined(COMPILER_GCC) && __GNUC__ >= 7
+#if defined(COMPILER_GCC) && __GNUC__ >= 10
// GCC has supported these for a long time, but they point at the function
// declaration in the case of default arguments, rather than at the call site.
#define SUPPORTS_LOCATION_BUILTINS 1
++++++ old-libva.patch ++++++
Index: chromium-81.0.4040.5/media/gpu/vaapi/vaapi_wrapper.cc
===================================================================
--- chromium-81.0.4040.5.orig/media/gpu/vaapi/vaapi_wrapper.cc
+++ chromium-81.0.4040.5/media/gpu/vaapi/vaapi_wrapper.cc
@@ -65,6 +65,10 @@
#include "ui/ozone/public/surface_factory_ozone.h"
#endif
+#ifndef VA_FOURCC_I420
+#define VA_FOURCC_I420 0x30323449
+#endif
+
using media_gpu_vaapi::kModuleVa;
using media_gpu_vaapi::kModuleVa_drm;
#if defined(USE_X11)
@@ -369,10 +373,6 @@ bool VADisplayState::Initialize() {
}
bool VADisplayState::InitializeOnce() {
- static_assert(
- VA_MAJOR_VERSION >= 2 || (VA_MAJOR_VERSION == 1 && VA_MINOR_VERSION >=
1),
- "Requires VA-API >= 1.1.0");
-
switch (gl::GetGLImplementation()) {
case gl::kGLImplementationEGLGLES2:
va_display_ = vaGetDisplayDRM(drm_fd_.get());
@@ -1508,7 +1508,7 @@ VaapiWrapper::ExportVASurfaceAsNativePix
LOG(ERROR) << "Cannot export an invalid surface";
return nullptr;
}
-
+#if VA_MAJOR_VERSION >= 2 || (VA_MAJOR_VERSION == 1 && VA_MINOR_VERSION >= 2)
VADRMPRIMESurfaceDescriptor descriptor;
{
base::AutoLock auto_lock(*va_lock_);
@@ -1601,6 +1601,10 @@ VaapiWrapper::ExportVASurfaceAsNativePix
exported_pixmap->pixmap = base::MakeRefCounted<gfx::NativePixmapDmaBuf>(
scoped_va_surface.size(), buffer_format, std::move(handle));
return exported_pixmap;
+#else
+ LOG(ERROR) << "Exporting a surface with FOURCC has been disabled on old
libva";
+ return nullptr;
+#endif
}
bool VaapiWrapper::SyncSurface(VASurfaceID va_surface_id) {
Index: chromium-81.0.4040.5/media/gpu/vaapi/vaapi_jpeg_decoder.cc
===================================================================
--- chromium-81.0.4040.5.orig/media/gpu/vaapi/vaapi_jpeg_decoder.cc
+++ chromium-81.0.4040.5/media/gpu/vaapi/vaapi_jpeg_decoder.cc
@@ -20,6 +20,10 @@
#include "media/parsers/jpeg_parser.h"
#include "ui/gfx/geometry/size.h"
+#ifndef VA_FOURCC_I420
+#define VA_FOURCC_I420 0x30323449
+#endif
+
namespace media {
namespace {
Index: chromium-81.0.4040.5/media/gpu/vaapi/vaapi_mjpeg_decode_accelerator.cc
===================================================================
--- chromium-81.0.4040.5.orig/media/gpu/vaapi/vaapi_mjpeg_decode_accelerator.cc
+++ chromium-81.0.4040.5/media/gpu/vaapi/vaapi_mjpeg_decode_accelerator.cc
@@ -44,6 +44,10 @@
#include "ui/gfx/geometry/size.h"
#include "ui/gfx/gpu_memory_buffer.h"
+#ifndef VA_FOURCC_I420
+#define VA_FOURCC_I420 0x30323449
+#endif
+
namespace media {
namespace {
Index: chromium-81.0.4040.5/media/gpu/chromeos/fourcc.cc
===================================================================
--- chromium-81.0.4040.5.orig/media/gpu/chromeos/fourcc.cc
+++ chromium-81.0.4040.5/media/gpu/chromeos/fourcc.cc
@@ -16,6 +16,13 @@
#include <va/va.h>
#endif // BUILDFLAG(USE_VAAPI)
+#ifndef VA_FOURCC_I420
+#define VA_FOURCC_I420 0x30323449
+#endif
+#ifndef VA_FOURCC_NV21
+#define VA_FOURCC_NV21 0x3132564E
+#endif
+
namespace media {
Fourcc::Fourcc(Fourcc::Value fourcc) : value_(fourcc) {}