Merge branch 'master' into f31

epel8
Tom Callaway 5 years ago
commit b69eec7b8c

@ -0,0 +1,22 @@
--- chromium-60.0.3112.40/build/linux/unbundle/ffmpeg.gn.ffmpeg-deprecation 2017-06-25 13:24:47.390218631 +0200
+++ chromium-60.0.3112.40/build/linux/unbundle/ffmpeg.gn 2017-06-25 13:32:48.528583949 +0200
@@ -19,6 +19,12 @@
flags = [ "USE_SYSTEM_FFMPEG=true" ]
}
+config("ffmpeg_deprecations") {
+ if (is_linux) {
+ cflags = [ "-Wno-error=deprecated-declarations" ]
+ }
+}
+
shim_headers("ffmpeg_shim") {
root_path = "."
headers = [
@@ -33,5 +39,5 @@
":ffmpeg_features",
":ffmpeg_shim",
]
- public_configs = [ ":system_ffmpeg" ]
+ public_configs = [ ":system_ffmpeg", ":ffmpeg_deprecations" ]
}

@ -21,14 +21,3 @@ diff -up chromium-80.0.3987.106/third_party/webrtc/modules/audio_processing/aec3
#include <vector>
#include "absl/types/optional.h"
diff -up chromium-80.0.3987.106/third_party/openscreen/src/util/trace_logging/scoped_trace_operations.h.memory chromium-80.0.3987.106/third_party/openscreen/src/util/trace_logging/scoped_trace_operations.h
--- chromium-80.0.3987.106/third_party/openscreen/src/util/trace_logging/scoped_trace_operations.h.memory 2020-02-24 11:35:38.283880819 -0500
+++ chromium-80.0.3987.106/third_party/openscreen/src/util/trace_logging/scoped_trace_operations.h 2020-02-24 11:35:48.366670897 -0500
@@ -7,6 +7,7 @@
#include <atomic>
#include <cstring>
+#include <memory>
#include <stack>
#include <vector>

@ -1,41 +0,0 @@
In file included from ../../third_party/blink/renderer/platform/heap/persistent.h:18,
from ../../third_party/blink/public/platform/web_private_ptr.h:40,
from ../../third_party/blink/public/platform/web_media_stream_track.h:33,
from ../../third_party/blink/public/platform/web_media_stream_source.h:37,
from ../../third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_handler.h:19,
from ../../third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_handler.cc:5:
../../third_party/blink/renderer/platform/wtf/cross_thread_copier.h: In instantiation of 'struct WTF::CrossThreadCopierPassThrough<webrtc::VideoTrackInterface>':
../../third_party/blink/renderer/modules/peerconnection/adapters/web_rtc_cross_thread_copier.h:169:14: required from here
../../third_party/blink/renderer/platform/wtf/cross_thread_copier.h:80:15: error: invalid abstract return type 'webrtc::VideoTrackInterface'
80 | static Type Copy(const T& parameter) { return parameter; }
| ^~~~
In file included from ../../third_party/webrtc/api/peer_connection_interface.h:88,
from ../../third_party/blink/public/platform/web_rtc_peer_connection_handler.h:39,
from ../../third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_handler.h:20,
from ../../third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_handler.cc:5:
../../third_party/webrtc/api/media_stream_interface.h:174:18: note: because the following virtual functions are pure within 'webrtc::VideoTrackInterface':
174 | class RTC_EXPORT VideoTrackInterface
| ^~~~~~~~~~~~~~~~~~~
../../third_party/webrtc/api/media_stream_interface.h:48:16: note: 'virtual void webrtc::NotifierInterface::RegisterObserver(webrtc::ObserverInterface*)'
48 | virtual void RegisterObserver(ObserverInterface* observer) = 0;
| ^~~~~~~~~~~~~~~~
../../third_party/webrtc/api/media_stream_interface.h:49:16: note: 'virtual void webrtc::NotifierInterface::UnregisterObserver(webrtc::ObserverInterface*)'
49 | virtual void UnregisterObserver(ObserverInterface* observer) = 0;
| ^~~~~~~~~~~~~~~~~~
diff --git a/third_party/blink/renderer/modules/peerconnection/adapters/web_rtc_cross_thread_copier.h b/third_party/blink/renderer/modules/peerconnection/adapters/web_rtc_cross_thread_copier.h
index 54cb7d1..0d6c40f 100644
--- a/third_party/blink/renderer/modules/peerconnection/adapters/web_rtc_cross_thread_copier.h
+++ b/third_party/blink/renderer/modules/peerconnection/adapters/web_rtc_cross_thread_copier.h
@@ -165,8 +165,9 @@ struct CrossThreadCopier<blink::MediaStreamVideoTrack>
};
template <>
-struct CrossThreadCopier<webrtc::VideoTrackInterface>
- : public CrossThreadCopierPassThrough<webrtc::VideoTrackInterface> {
+struct CrossThreadCopier<rtc::scoped_refptr<webrtc::VideoTrackInterface>>
+ : public CrossThreadCopierPassThrough<
+ rtc::scoped_refptr<webrtc::VideoTrackInterface>> {
STATIC_ONLY(CrossThreadCopier);
};

@ -1,229 +0,0 @@
From cdf3e81ff49b200213d67d65558f2919222b60ab Mon Sep 17 00:00:00 2001
From: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Date: Mon, 16 Dec 2019 11:39:11 +0000
Subject: [PATCH] BookmarkModelMerger: Move RemoteTreeNode declaration to header.
This fixes the build with libstdc++ after commit 8f5dad93e58 ("Fix CHECK
failure due to untracked local nodes"):
/usr/lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/stl_pair.h:215:11: error: field has incomplete type 'sync_bookmarks::BookmarkModelMerger::RemoteTreeNode'
_T2 second; /// @c second is a copy of the second object
^
/usr/lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/ext/aligned_buffer.h:91:28: note: in instantiation of template class 'std::pair<const std::__cxx11::basic_string<char>, sync_bookmarks::BookmarkModelMerger::RemoteTreeNode>' requested here
: std::aligned_storage<sizeof(_Tp), __alignof__(_Tp)>
^
/usr/lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/hashtable_policy.h:233:43: note: in instantiation of template class '__gnu_cxx::__aligned_buffer<std::pair<const std::__cxx11::basic_string<char>, sync_bookmarks::BookmarkModelMerger::RemoteTreeNode> >' requested here
__gnu_cxx::__aligned_buffer<_Value> _M_storage;
^
/usr/lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/hashtable_policy.h:264:39: note: in instantiation of template class 'std::__detail::_Hash_node_value_base<std::pair<const std::__cxx11::basic_string<char>, sync_bookmarks::BookmarkModelMerger::RemoteTreeNode> >' requested here
struct _Hash_node<_Value, true> : _Hash_node_value_base<_Value>
^
/usr/lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/hashtable_policy.h:2028:25: note: in instantiation of template class 'std::__detail::_Hash_node<std::pair<const std::__cxx11::basic_string<char>, sync_bookmarks::BookmarkModelMerger::RemoteTreeNode>, true>' requested here
rebind_traits<typename __node_type::value_type>;
^
/usr/lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/hashtable.h:184:15: note: in instantiation of template class 'std::__detail::_Hashtable_alloc<std::allocator<std::__detail::_Hash_node<std::pair<const std::__cxx11::basic_string<char>, sync_bookmarks::BookmarkModelMerger::RemoteTreeNode>, true> > >
' requested here
private __detail::_Hashtable_alloc<
^
/usr/lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/unordered_map.h:105:18: note: in instantiation of template class 'std::_Hashtable<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, sync_bookmarks::BookmarkModelMerger::RemoteTreeNode>, std::allocator<std::pair<con
st std::__cxx11::basic_string<char>, sync_bookmarks::BookmarkModelMerger::RemoteTreeNode> >, std::__detail::_Select1st, std::equal_to<std::__cxx11::basic_string<char> >, std::hash<std::string>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__deta
il::_Hashtable_traits<true, false, true> >' requested here
_Hashtable _M_h;
^
../../components/sync_bookmarks/bookmark_model_merger.h:146:22: note: in instantiation of template class 'std::unordered_map<std::__cxx11::basic_string<char>, sync_bookmarks::BookmarkModelMerger::RemoteTreeNode, std::hash<std::string>, std::equal_to<std::__cxx11::basic_string<char> >, std::allocator<std::pair<con
st std::__cxx11::basic_string<char>, sync_bookmarks::BookmarkModelMerger::RemoteTreeNode> > >' requested here
const RemoteForest remote_forest_;
^
../../components/sync_bookmarks/bookmark_model_merger.h:53:9: note: forward declaration of 'sync_bookmarks::BookmarkModelMerger::RemoteTreeNode'
class RemoteTreeNode;
^
Essentially, the problem is that libstdc++'s std::unordered_map<T, U>
implementation requires both T and U to be fully declared. I raised the
problem in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92770, and GCC's
position is that we are relying on undefined behavior according to the C++
standard (https://eel.is/c++draft/requirements#res.on.functions-2.5).
Bug: 957519
Change-Id: Ife7e435e516932a795bfbe05b2c910c3272878f0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1960156
Commit-Queue: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Reviewed-by: Mikel Astiz <mastiz@chromium.org>
Auto-Submit: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Cr-Commit-Position: refs/heads/master@{#725070}
---
diff --git a/components/sync_bookmarks/bookmark_model_merger.cc b/components/sync_bookmarks/bookmark_model_merger.cc
index eae153ef..579848e 100644
--- a/components/sync_bookmarks/bookmark_model_merger.cc
+++ b/components/sync_bookmarks/bookmark_model_merger.cc
@@ -5,7 +5,6 @@
#include "components/sync_bookmarks/bookmark_model_merger.h"
#include <algorithm>
-#include <memory>
#include <set>
#include <string>
#include <utility>
@@ -205,66 +204,44 @@
} // namespace
-class BookmarkModelMerger::RemoteTreeNode final {
- public:
- // Constructs a tree given |update| as root and recursively all descendants by
- // traversing |*updates_per_parent_id|. |update| and |updates_per_parent_id|
- // must not be null. All updates |*updates_per_parent_id| must represent valid
- // updates. Updates corresponding from descendant nodes are moved away from
- // |*updates_per_parent_id|.
- static RemoteTreeNode BuildTree(
- std::unique_ptr<syncer::UpdateResponseData> update,
- UpdatesPerParentId* updates_per_parent_id);
+BookmarkModelMerger::RemoteTreeNode::RemoteTreeNode() = default;
- ~RemoteTreeNode() = default;
+BookmarkModelMerger::RemoteTreeNode::~RemoteTreeNode() = default;
- // Allow moves, useful during construction.
- RemoteTreeNode(RemoteTreeNode&&) = default;
- RemoteTreeNode& operator=(RemoteTreeNode&&) = default;
+BookmarkModelMerger::RemoteTreeNode::RemoteTreeNode(
+ BookmarkModelMerger::RemoteTreeNode&&) = default;
+BookmarkModelMerger::RemoteTreeNode& BookmarkModelMerger::RemoteTreeNode::
+operator=(BookmarkModelMerger::RemoteTreeNode&&) = default;
- const syncer::EntityData& entity() const { return *update_->entity; }
- int64_t response_version() const { return update_->response_version; }
+void BookmarkModelMerger::RemoteTreeNode::EmplaceSelfAndDescendantsByGUID(
+ std::unordered_map<std::string, const RemoteTreeNode*>*
+ guid_to_remote_node_map) const {
+ DCHECK(guid_to_remote_node_map);
- // Direct children nodes, sorted by ascending unique position. These are
- // guaranteed to be valid updates (e.g. IsValidBookmarkSpecifics()).
- const std::vector<RemoteTreeNode>& children() const { return children_; }
+ const std::string& guid = entity().specifics.bookmark().guid();
+ if (!guid.empty()) {
+ DCHECK(base::IsValidGUID(guid));
- // Recursively emplaces all GUIDs (this node and descendants) into
- // |*guid_to_remote_node_map|, which must not be null.
- void EmplaceSelfAndDescendantsByGUID(
- std::unordered_map<std::string, const RemoteTreeNode*>*
- guid_to_remote_node_map) const {
- DCHECK(guid_to_remote_node_map);
-
- const std::string& guid = entity().specifics.bookmark().guid();
- if (!guid.empty()) {
- DCHECK(base::IsValidGUID(guid));
-
- // Duplicate GUIDs have been sorted out before.
- bool success = guid_to_remote_node_map->emplace(guid, this).second;
- DCHECK(success);
- }
-
- for (const RemoteTreeNode& child : children_) {
- child.EmplaceSelfAndDescendantsByGUID(guid_to_remote_node_map);
- }
+ // Duplicate GUIDs have been sorted out before.
+ bool success = guid_to_remote_node_map->emplace(guid, this).second;
+ DCHECK(success);
}
- private:
- static bool UniquePositionLessThan(const RemoteTreeNode& lhs,
- const RemoteTreeNode& rhs) {
- const syncer::UniquePosition a_pos =
- syncer::UniquePosition::FromProto(lhs.entity().unique_position);
- const syncer::UniquePosition b_pos =
- syncer::UniquePosition::FromProto(rhs.entity().unique_position);
- return a_pos.LessThan(b_pos);
+ for (const RemoteTreeNode& child : children_) {
+ child.EmplaceSelfAndDescendantsByGUID(guid_to_remote_node_map);
}
+}
- RemoteTreeNode() = default;
-
- std::unique_ptr<syncer::UpdateResponseData> update_;
- std::vector<RemoteTreeNode> children_;
-};
+// static
+bool BookmarkModelMerger::RemoteTreeNode::UniquePositionLessThan(
+ const RemoteTreeNode& lhs,
+ const RemoteTreeNode& rhs) {
+ const syncer::UniquePosition a_pos =
+ syncer::UniquePosition::FromProto(lhs.entity().unique_position);
+ const syncer::UniquePosition b_pos =
+ syncer::UniquePosition::FromProto(rhs.entity().unique_position);
+ return a_pos.LessThan(b_pos);
+}
// static
BookmarkModelMerger::RemoteTreeNode
diff --git a/components/sync_bookmarks/bookmark_model_merger.h b/components/sync_bookmarks/bookmark_model_merger.h
index 9b59200..bf0783ec 100644
--- a/components/sync_bookmarks/bookmark_model_merger.h
+++ b/components/sync_bookmarks/bookmark_model_merger.h
@@ -5,6 +5,7 @@
#ifndef COMPONENTS_SYNC_BOOKMARKS_BOOKMARK_MODEL_MERGER_H_
#define COMPONENTS_SYNC_BOOKMARKS_BOOKMARK_MODEL_MERGER_H_
+#include <memory>
#include <string>
#include <unordered_map>
#include <vector>
@@ -50,7 +51,52 @@
private:
// Internal representation of a remote tree, composed of nodes.
- class RemoteTreeNode;
+ class RemoteTreeNode final {
+ private:
+ using UpdatesPerParentId =
+ std::unordered_map<base::StringPiece,
+ syncer::UpdateResponseDataList,
+ base::StringPieceHash>;
+
+ public:
+ // Constructs a tree given |update| as root and recursively all descendants
+ // by traversing |*updates_per_parent_id|. |update| and
+ // |updates_per_parent_id| must not be null. All updates
+ // |*updates_per_parent_id| must represent valid updates. Updates
+ // corresponding from descendant nodes are moved away from
+ // |*updates_per_parent_id|.
+ static RemoteTreeNode BuildTree(
+ std::unique_ptr<syncer::UpdateResponseData> update,
+ UpdatesPerParentId* updates_per_parent_id);
+
+ ~RemoteTreeNode();
+
+ // Allow moves, useful during construction.
+ RemoteTreeNode(RemoteTreeNode&&);
+ RemoteTreeNode& operator=(RemoteTreeNode&&);
+
+ const syncer::EntityData& entity() const { return *update_->entity; }
+ int64_t response_version() const { return update_->response_version; }
+
+ // Direct children nodes, sorted by ascending unique position. These are
+ // guaranteed to be valid updates (e.g. IsValidBookmarkSpecifics()).
+ const std::vector<RemoteTreeNode>& children() const { return children_; }
+
+ // Recursively emplaces all GUIDs (this node and descendants) into
+ // |*guid_to_remote_node_map|, which must not be null.
+ void EmplaceSelfAndDescendantsByGUID(
+ std::unordered_map<std::string, const RemoteTreeNode*>*
+ guid_to_remote_node_map) const;
+
+ private:
+ static bool UniquePositionLessThan(const RemoteTreeNode& lhs,
+ const RemoteTreeNode& rhs);
+
+ RemoteTreeNode();
+
+ std::unique_ptr<syncer::UpdateResponseData> update_;
+ std::vector<RemoteTreeNode> children_;
+ };
// A forest composed of multiple trees where the root of each tree represents
// a permanent node, keyed by server-defined unique tag of the root.

@ -1,33 +0,0 @@
In file included from ../../media/base/media_log_properties.h:13,
from ../../media/base/media_log.h:23,
from ../../media/filters/frame_processor.h:15,
from ../../media/filters/frame_processor.cc:5:
../../media/base/media_log_properties_helper.h:86:8: error: extra qualification not allowed [-fpermissive]
86 | struct internal::MediaLogPropertyTypeConverter<media::AudioDecoderConfig> {
| ^~~~~~~~
../../media/base/media_log_properties_helper.h:86:75: error: explicit specialization of non-template 'media::internal::<unnamed struct>'
86 | struct internal::MediaLogPropertyTypeConverter<media::AudioDecoderConfig> {
| ^
diff --git a/media/base/media_log_properties_helper.h b/media/base/media_log_properties_helper.h
index 95ff70a..549b003 100644
--- a/media/base/media_log_properties_helper.h
+++ b/media/base/media_log_properties_helper.h
@@ -83,7 +83,7 @@ struct MediaLogPropertyTypeConverter<std::vector<T>> {
// Specializer for sending AudioDecoderConfigs to the media tab in devtools.
template <>
-struct internal::MediaLogPropertyTypeConverter<media::AudioDecoderConfig> {
+struct MediaLogPropertyTypeConverter<media::AudioDecoderConfig> {
static base::Value Convert(const AudioDecoderConfig& value) {
base::Value result(base::Value::Type::DICTIONARY);
result.SetStringKey("codec", GetCodecName(value.codec()));
@@ -114,7 +114,7 @@ struct internal::MediaLogPropertyTypeConverter<media::AudioDecoderConfig> {
// Specializer for sending VideoDecoderConfigs to the media tab in devtools.
template <>
-struct internal::MediaLogPropertyTypeConverter<VideoDecoderConfig> {
+struct MediaLogPropertyTypeConverter<VideoDecoderConfig> {
static base::Value Convert(const VideoDecoderConfig& value) {
base::Value result(base::Value::Type::DICTIONARY);
result.SetStringKey("codec", GetCodecName(value.codec()));

@ -1,33 +0,0 @@
From 8273f4d3130e06fd8b6bef87b07c936304b971d9 Mon Sep 17 00:00:00 2001
From: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Date: Tue, 10 Dec 2019 20:59:57 +0000
Subject: [PATCH] [cros search service]: Include <cmath> for std::pow()
IWYU. Follow up to commit 2b2ea3c09b ("[cros search service] Move shared
string matching functions to //chrome"), which broke the libstdc++ build:
../../chrome/common/string_matching/fuzzy_tokenized_string_match.cc:199:14: error: no member named 'pow' in namespace 'std'
std::pow(partial_match_penalty_rate, long_start - current - 1);
~~~~~^
Bug: 957519
Change-Id: I66f61cb4f93cfa0bfa3d1b00ba391ddd8f31a7fb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1960310
Auto-Submit: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Reviewed-by: Jia Meng <jiameng@chromium.org>
Commit-Queue: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Cr-Commit-Position: refs/heads/master@{#723499}
---
diff --git a/chrome/common/string_matching/fuzzy_tokenized_string_match.cc b/chrome/common/string_matching/fuzzy_tokenized_string_match.cc
index 8351fa7..884ef63 100644
--- a/chrome/common/string_matching/fuzzy_tokenized_string_match.cc
+++ b/chrome/common/string_matching/fuzzy_tokenized_string_match.cc
@@ -5,6 +5,7 @@
#include "chrome/common/string_matching/fuzzy_tokenized_string_match.h"
#include <algorithm>
+#include <cmath>
#include <iterator>
#include "base/i18n/case_conversion.h"

@ -53,3 +53,15 @@ diff -up chromium-80.0.3987.106/third_party/webrtc/modules/include/module_common
#include <limits>
#include "absl/types/optional.h"
diff -up chromium-81.0.4044.92/ui/gfx/linux/drm_util_linux.h.missing-cstdint chromium-81.0.4044.92/ui/gfx/linux/drm_util_linux.h
--- chromium-81.0.4044.92/ui/gfx/linux/drm_util_linux.h.missing-cstdint 2020-04-13 15:33:24.879106867 -0400
+++ chromium-81.0.4044.92/ui/gfx/linux/drm_util_linux.h 2020-04-13 15:33:47.453689695 -0400
@@ -7,6 +7,8 @@
#include "ui/gfx/buffer_types.h"
+#include <cstdint>
+
namespace ui {
int GetFourCCFormatFromBufferFormat(gfx::BufferFormat format);

@ -0,0 +1,19 @@
diff --git a/ui/views/layout/layout_types.h b/ui/views/layout/layout_types.h
index 8f9dbf4..ba118b9 100644
--- a/ui/views/layout/layout_types.h
+++ b/ui/views/layout/layout_types.h
@@ -45,12 +45,12 @@ class VIEWS_EXPORT SizeBounds {
~SizeBounds() = default;
constexpr const base::Optional<int>& width() const { return width_; }
- constexpr void set_width(base::Optional<int> width) {
+ inline void set_width(base::Optional<int> width) {
width_ = std::move(width);
}
constexpr const base::Optional<int>& height() const { return height_; }
- constexpr void set_height(base::Optional<int> height) {
+ inline void set_height(base::Optional<int> height) {
height_ = std::move(height);
}

@ -0,0 +1,13 @@
diff --git a/components/paint_preview/browser/paint_preview_client.cc b/components/paint_preview/browser/paint_preview_client.cc
index 38ab6be..dccf07f 100644
--- a/components/paint_preview/browser/paint_preview_client.cc
+++ b/components/paint_preview/browser/paint_preview_client.cc
@@ -78,7 +78,7 @@ PaintPreviewClient::PaintPreviewData::PaintPreviewData() = default;
PaintPreviewClient::PaintPreviewData::~PaintPreviewData() = default;
PaintPreviewClient::PaintPreviewData& PaintPreviewClient::PaintPreviewData::
-operator=(PaintPreviewData&& rhs) noexcept = default;
+operator=(PaintPreviewData&& rhs) = default;
PaintPreviewClient::PaintPreviewData::PaintPreviewData(
PaintPreviewData&& other) noexcept = default;

@ -0,0 +1,52 @@
From 98e343ab369e4262511b5fce547728e3e5eefba8 Mon Sep 17 00:00:00 2001
From: Hidehiko Abe <hidehiko@chromium.org>
Date: Fri, 31 Jan 2020 21:27:40 +0000
Subject: [PATCH] Use same condition for field declaration and its use.
cros_supported_configs_ is defined iff OS_CHROMEOS is defined.
However, it is used iff USE_CHROMEOS_MEDIA_ACCELERATION regardless of
OS_CHROMEOS.
This CL aligns the conditions.
BUG=1047719
TEST=Build locally.
Change-Id: I08fe8532c1778ff8c77c7a9d9cdd96ff2a83272f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2030924
Reviewed-by: Xiaohan Wang <xhwang@chromium.org>
Reviewed-by: Miguel Casas <mcasas@chromium.org>
Commit-Queue: Miguel Casas <mcasas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#737459}
---
--- a/media/mojo/services/gpu_mojo_media_client.cc
+++ b/media/mojo/services/gpu_mojo_media_client.cc
@@ -157,7 +157,7 @@ GpuMojoMediaClient::GetSupportedVideoDec
supported_config_map[VideoDecoderImplementation::kAlternate] =
*d3d11_supported_configs_;
-#elif BUILDFLAG(USE_CHROMEOS_MEDIA_ACCELERATION)
+#elif defined(OS_CHROMEOS) && BUILDFLAG(USE_CHROMEOS_MEDIA_ACCELERATION)
if (base::FeatureList::IsEnabled(kChromeosVideoDecoder)) {
if (!cros_supported_configs_) {
cros_supported_configs_ =
--- a/media/mojo/services/gpu_mojo_media_client.h
+++ b/media/mojo/services/gpu_mojo_media_client.h
@@ -74,16 +74,13 @@ class GpuMojoMediaClient : public MojoMe
#if defined(OS_CHROMEOS) && BUILDFLAG(USE_CHROMEOS_MEDIA_ACCELERATION)
// Indirectly owned by GpuChildThread.
gpu::GpuMemoryBufferFactory* const gpu_memory_buffer_factory_;
+ base::Optional<SupportedVideoDecoderConfigs> cros_supported_configs_;
#endif // defined(OS_CHROMEOS) && BUILDFLAG(USE_CHROMEOS_MEDIA_ACCELERATION)
CdmProxyFactoryCB cdm_proxy_factory_cb_;
#if defined(OS_WIN)
base::Optional<SupportedVideoDecoderConfigs> d3d11_supported_configs_;
#endif // defined(OS_WIN)
-#if defined(OS_CHROMEOS)
- base::Optional<SupportedVideoDecoderConfigs> cros_supported_configs_;
-#endif // defined(OS_CHROMEOS)
-
DISALLOW_COPY_AND_ASSIGN(GpuMojoMediaClient);
};

@ -0,0 +1,31 @@
From 5b2ff215473e0526b5b24aeff4ad90d369b21c75 Mon Sep 17 00:00:00 2001
From: Julien Isorce <julien.isorce@chromium.org>
Date: Wed, 05 Feb 2020 17:59:59 +0000
Subject: [PATCH] Fix vaapi with GLX
The signature of ui's gl::GLImageGLX has changed a little bit
since "mplement GpuMemoryBuffers for EGL and GLX":
https://chromium-review.googlesource.com/c/chromium/src/+/1984712
Bug: 1031269
Test: build with use_vaapi=true and run with --use-gl=desktop, see
Change-Id: I80b07294b9abdfa8233aaf79f7d9ec4c58117090
https: //chromium.googlesource.com/chromium/src.git/+/refs/heads/master/docs/gpu/vaapi.md#vaapi-on-linux
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2036494
Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
Reviewed-by: Miguel Casas <mcasas@chromium.org>
Commit-Queue: Julien Isorce <julien.isorce@chromium.org>
Cr-Commit-Position: refs/heads/master@{#738595}
---
--- a/media/gpu/vaapi/vaapi_picture_tfp.cc
+++ b/media/gpu/vaapi/vaapi_picture_tfp.cc
@@ -57,7 +57,7 @@ bool VaapiTFPPicture::Initialize() {
if (make_context_current_cb_ && !make_context_current_cb_.Run())
return false;
- glx_image_ = new gl::GLImageGLX(size_, GL_RGB);
+ glx_image_ = new gl::GLImageGLX(size_, gfx::BufferFormat::BGRX_8888);
if (!glx_image_->Initialize(x_pixmap_)) {
// x_pixmap_ will be freed in the destructor.
DLOG(ERROR) << "Failed creating a GLX Pixmap for TFP";

@ -0,0 +1,13 @@
diff -up chromium-81.0.4044.92/base/test/BUILD.gn.nofontconfigcache chromium-81.0.4044.92/base/test/BUILD.gn
--- chromium-81.0.4044.92/base/test/BUILD.gn.nofontconfigcache 2020-04-13 12:06:59.233796815 -0400
+++ chromium-81.0.4044.92/base/test/BUILD.gn 2020-04-13 12:20:16.302174851 -0400
@@ -245,9 +245,6 @@ static_library("test_support") {
if (is_linux) {
public_deps += [ ":fontconfig_util_linux" ]
data_deps = [ "//third_party/test_fonts" ]
- if (current_toolchain == host_toolchain) {
- data_deps += [ ":do_generate_fontconfig_caches" ]
- }
}
if (is_ios) {

@ -1,17 +1,7 @@
From 9ff06536caf7ea51aad9fd2bb649c858eaf7ee84 Mon Sep 17 00:00:00 2001
From: Akarshan Biswas <akarshanbiswas@fedoraproject.org>
Date: Sat, 26 Oct 2019 10:06:30 +0530
Subject: [PATCH] Move offending function to chromeos only
---
media/gpu/vaapi/vaapi_video_decode_accelerator.cc | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/media/gpu/vaapi/vaapi_video_decode_accelerator.cc b/media/gpu/vaapi/vaapi_video_decode_accelerator.cc
index f04b60f58..3e7865503 100644
--- a/media/gpu/vaapi/vaapi_video_decode_accelerator.cc
+++ b/media/gpu/vaapi/vaapi_video_decode_accelerator.cc
@@ -63,6 +63,7 @@ void ReportToUMA(VAVDADecoderFailure failure) {
diff -up chromium-81.0.4044.92/media/gpu/vaapi/vaapi_video_decode_accelerator.cc.vaapi-intel-fix chromium-81.0.4044.92/media/gpu/vaapi/vaapi_video_decode_accelerator.cc
--- chromium-81.0.4044.92/media/gpu/vaapi/vaapi_video_decode_accelerator.cc.vaapi-intel-fix 2020-04-03 00:11:34.000000000 -0400
+++ chromium-81.0.4044.92/media/gpu/vaapi/vaapi_video_decode_accelerator.cc 2020-04-13 15:42:35.830413667 -0400
@@ -63,6 +63,7 @@ void ReportToUMA(VAVDADecoderFailure fai
VAVDA_DECODER_FAILURES_MAX + 1);
}
@ -23,11 +13,11 @@ index f04b60f58..3e7865503 100644
cpuid.model() >= kGeminiLakeModelId;
return is_geminilake_or_later;
}
+#endif
} // namespace
+#endif
@@ -1091,6 +1093,8 @@ VaapiVideoDecodeAccelerator::DecideBufferAllocationMode() {
// Returns the size of a rectangle whose upper left corner is at the origin (0,
// 0) and whose bottom right corner is the same as that of |rect|. This is
@@ -1204,6 +1206,8 @@ VaapiVideoDecodeAccelerator::DecideBuffe
if (output_mode_ == VideoDecodeAccelerator::Config::OutputMode::IMPORT)
return BufferAllocationMode::kNormal;
@ -36,7 +26,7 @@ index f04b60f58..3e7865503 100644
// On Gemini Lake, Kaby Lake and later we can pass to libva the client's
// PictureBuffers to decode onto, which skips the use of the Vpp unit and its
// associated format reconciliation copy, avoiding all internal buffer
@@ -1107,6 +1111,7 @@ VaapiVideoDecodeAccelerator::DecideBufferAllocationMode() {
@@ -1220,6 +1224,7 @@ VaapiVideoDecodeAccelerator::DecideBuffe
num_extra_pics_ = 3;
return BufferAllocationMode::kNone;
}
@ -44,6 +34,3 @@ index f04b60f58..3e7865503 100644
// If we're here, we have to use the Vpp unit and allocate buffers for
// |decoder_|; usually we'd have to allocate the |decoder_|s
--
2.21.0

@ -0,0 +1,11 @@
diff -up chromium-81.0.4044.92/base/test/icu_test_util.h.missing-memory chromium-81.0.4044.92/base/test/icu_test_util.h
--- chromium-81.0.4044.92/base/test/icu_test_util.h.missing-memory 2020-04-15 07:52:11.239815139 -0400
+++ chromium-81.0.4044.92/base/test/icu_test_util.h 2020-04-15 07:52:19.982632306 -0400
@@ -5,6 +5,7 @@
#ifndef BASE_TEST_ICU_TEST_UTIL_H_
#define BASE_TEST_ICU_TEST_UTIL_H_
+#include <memory>
#include <string>
#include "base/macros.h"

@ -0,0 +1,79 @@
diff -up chromium-81.0.4044.92/chrome/common/safe_browsing/BUILD.gn.nounrar chromium-81.0.4044.92/chrome/common/safe_browsing/BUILD.gn
--- chromium-81.0.4044.92/chrome/common/safe_browsing/BUILD.gn.nounrar 2020-04-13 12:01:29.703428516 -0400
+++ chromium-81.0.4044.92/chrome/common/safe_browsing/BUILD.gn 2020-04-13 12:03:33.653310203 -0400
@@ -72,39 +72,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",
- ":file_type_policies",
- "//base",
- "//base:i18n",
- "//components/safe_browsing/core:features",
- "//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",
@@ -171,7 +138,6 @@ source_set("safe_browsing") {
":archive_analyzer_results",
":binary_feature_extractor",
":download_type_util",
- ":rar_analyzer",
"//components/safe_browsing/core:features",
]
diff -up chromium-81.0.4044.92/chrome/common/safe_browsing/DEPS.nounrar chromium-81.0.4044.92/chrome/common/safe_browsing/DEPS
--- chromium-81.0.4044.92/chrome/common/safe_browsing/DEPS.nounrar 2020-04-03 00:10:40.000000000 -0400
+++ chromium-81.0.4044.92/chrome/common/safe_browsing/DEPS 2020-04-13 12:01:29.703428516 -0400
@@ -1,6 +1,5 @@
include_rules = [
"+components/safe_browsing",
"+third_party/protobuf",
- "+third_party/unrar",
"+third_party/zlib",
]
diff -up chromium-81.0.4044.92/chrome/services/file_util/safe_archive_analyzer.cc.nounrar chromium-81.0.4044.92/chrome/services/file_util/safe_archive_analyzer.cc
--- chromium-81.0.4044.92/chrome/services/file_util/safe_archive_analyzer.cc.nounrar 2020-04-03 00:10:40.000000000 -0400
+++ chromium-81.0.4044.92/chrome/services/file_util/safe_archive_analyzer.cc 2020-04-13 12:01:29.703428516 -0400
@@ -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
}

@ -0,0 +1,12 @@
diff -up chromium-81.0.4044.92/third_party/perfetto/gn/BUILD.gn.unbundle-zlib chromium-81.0.4044.92/third_party/perfetto/gn/BUILD.gn
--- chromium-81.0.4044.92/third_party/perfetto/gn/BUILD.gn.unbundle-zlib 2020-04-13 12:25:09.001172601 -0400
+++ chromium-81.0.4044.92/third_party/perfetto/gn/BUILD.gn 2020-04-13 12:25:23.688921586 -0400
@@ -294,7 +294,7 @@ if (enable_perfetto_zlib) {
public_configs = [ "//buildtools:zlib_config" ]
public_deps = [ "//buildtools:zlib" ]
} else {
- public_configs = [ "//third_party/zlib:zlib_config" ]
+ public_configs = [ "//third_party/zlib:system_zlib" ]
public_deps = [ "//third_party/zlib" ]
}
}

File diff suppressed because one or more lines are too long

@ -1,20 +1,7 @@
From e04b52fc9b12f0725e76b889161ea45c776e6da5 Mon Sep 17 00:00:00 2001
From: Akarshan Biswas <akarshanbiswas@fedoraproject.org>
Date: Fri, 20 Sep 2019 19:55:45 +0530
Subject: [PATCH] Enable VAAPI on Linux
---
chrome/browser/about_flags.cc | 8 ++++----
chrome/browser/flag_descriptions.cc | 9 ++++++---
chrome/browser/flag_descriptions.h | 10 ++++++++--
gpu/config/software_rendering_list.json | 3 ++-
4 files changed, 20 insertions(+), 10 deletions(-)
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index e608f06a2..c0776db45 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -1738,7 +1738,7 @@ const FeatureEntry kFeatureEntries[] = {
diff -up chromium-81.0.4044.92/chrome/browser/about_flags.cc.vaapi chromium-81.0.4044.92/chrome/browser/about_flags.cc
--- chromium-81.0.4044.92/chrome/browser/about_flags.cc.vaapi 2020-04-03 00:11:28.000000000 -0400
+++ chromium-81.0.4044.92/chrome/browser/about_flags.cc 2020-04-13 15:09:02.982509507 -0400
@@ -1920,7 +1920,7 @@ const FeatureEntry kFeatureEntries[] = {
"disable-accelerated-video-decode",
flag_descriptions::kAcceleratedVideoDecodeName,
flag_descriptions::kAcceleratedVideoDecodeDescription,
@ -23,7 +10,7 @@ index e608f06a2..c0776db45 100644
SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
},
{
@@ -2216,12 +2216,12 @@ const FeatureEntry kFeatureEntries[] = {
@@ -2352,12 +2352,12 @@ const FeatureEntry kFeatureEntries[] = {
FEATURE_VALUE_TYPE(service_manager::features::kXRSandbox)},
#endif // !defined(OS_ANDROID)
#endif // ENABLE_VR
@ -39,11 +26,10 @@ index e608f06a2..c0776db45 100644
{"system-keyboard-lock", flag_descriptions::kSystemKeyboardLockName,
flag_descriptions::kSystemKeyboardLockDescription, kOsDesktop,
FEATURE_VALUE_TYPE(features::kSystemKeyboardLock)},
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
index d27bbb28f..1c6542bdd 100644
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -3071,16 +3071,19 @@ const char kMacSystemMediaPermissionsInfoUiDescription[] =
diff -up chromium-81.0.4044.92/chrome/browser/flag_descriptions.cc.vaapi chromium-81.0.4044.92/chrome/browser/flag_descriptions.cc
--- chromium-81.0.4044.92/chrome/browser/flag_descriptions.cc.vaapi 2020-04-03 00:11:29.000000000 -0400
+++ chromium-81.0.4044.92/chrome/browser/flag_descriptions.cc 2020-04-13 15:09:02.983509488 -0400
@@ -2999,16 +2999,19 @@ const char kMetalDescription[] =
#endif
@ -66,11 +52,10 @@ index d27bbb28f..1c6542bdd 100644
const char kAggregatedMlAppRankingName[] = "Rank suggested apps with ML.";
const char kAggregatedMlAppRankingDescription[] =
"Use the aggregated ML model to rank the suggested apps.";
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
index 1f8899de1..06544e079 100644
--- a/chrome/browser/flag_descriptions.h
+++ b/chrome/browser/flag_descriptions.h
@@ -1822,13 +1822,19 @@ extern const char kPermissionPromptPersistenceToggleDescription[];
diff -up chromium-81.0.4044.92/chrome/browser/flag_descriptions.h.vaapi chromium-81.0.4044.92/chrome/browser/flag_descriptions.h
--- chromium-81.0.4044.92/chrome/browser/flag_descriptions.h.vaapi 2020-04-03 00:11:29.000000000 -0400
+++ chromium-81.0.4044.92/chrome/browser/flag_descriptions.h 2020-04-13 15:09:02.983509488 -0400
@@ -1730,13 +1730,19 @@ extern const char kMetalDescription[];
#endif // defined(OS_MACOSX)
@ -92,24 +77,20 @@ index 1f8899de1..06544e079 100644
extern const char kAggregatedMlAppRankingName[];
extern const char kAggregatedMlAppRankingDescription[];
diff --git a/gpu/config/software_rendering_list.json b/gpu/config/software_rendering_list.json
index ea1294e4c..bc52cbc8f 100644
--- a/gpu/config/software_rendering_list.json
+++ b/gpu/config/software_rendering_list.json
@@ -334,11 +334,12 @@
diff -up chromium-81.0.4044.92/gpu/config/software_rendering_list.json.vaapi chromium-81.0.4044.92/gpu/config/software_rendering_list.json
--- chromium-81.0.4044.92/gpu/config/software_rendering_list.json.vaapi 2020-04-13 15:09:02.988509396 -0400
+++ chromium-81.0.4044.92/gpu/config/software_rendering_list.json 2020-04-13 15:19:03.380353582 -0400
@@ -337,11 +337,12 @@
},
{
"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],
"cr_bugs": [137247, 1032907],
"os": {
"type": "linux"
},
+ "vendor_id": "0x10de",
"features": [
"accelerated_video_decode"
]
--
2.21.0
+ "vendor_id": "0x10de",
"exceptions": [
{
"machine_model_name": ["Chromecast"]

@ -17,4 +17,4 @@ SHA512 (Tinos-Italic.ttf) = d4f4f096110ef98a781a2a0e0d319317e5f84e650fe6f4d4f6b0
SHA512 (Tinos-Regular.ttf) = 58085c5dac6d067d60ba2ab3220c4a0cc1efcf279cadfcfb8746a5e5fa1a6f6daa62750dc2051b3b2d8a51b4d2e9bb0f66594caf2253c0870ed9c7286fa45e8f
SHA512 (Ahem.ttf) = aeb64b10ab9c87860714cb60b4900254b13dc52c51319256a1a3722c882026ab7c616bf628fbc2fe14e38a6003f3a481af60b52a7ed62071d28ddaf428e4e3fd
SHA512 (node-v10.15.3-linux-x64.tar.gz) = 5eb544ef706562981340a82acc79e2162c6a3e4049b4a95f69ce353ee5b0f929c60b1fc457e8249b3fb0696f82fc28c5f543f5947db19fae4e9d5c21b906bb20
SHA512 (chromium-80.0.3987.163-clean.tar.xz) = 3649ae457b49c1d2d1a770da670bdd601e3ed15d3596df6b5d9b2ec83f996dfffa0c95321267ba608b390ed6c1ef10f6097ec67c825a980b2546fc9d84bdac05
SHA512 (chromium-81.0.4044.92-clean.tar.xz) = e6febde53531fecf40b26bcb0c3055ede710901a4ddeba7001dc2317c9eb66159d79c607353696cb2ffbe0da96fbcabcb98430fd55a9a629813ef1a4b7dbb4c1

Loading…
Cancel
Save