Skip to content

Commit

Permalink
cr-patches: update for 5672
Browse files Browse the repository at this point in the history
  • Loading branch information
licy183 committed Sep 25, 2023
1 parent ff8231a commit 7822419
Show file tree
Hide file tree
Showing 7 changed files with 895 additions and 0 deletions.
37 changes: 37 additions & 0 deletions common-files/chromium-patches/add-missing-typename/5672.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
https://github.com/chromium/chromium/commit/1c8292d56909061b1da34f137c5b104831206701
--- a/chrome/browser/download/bubble/download_bubble_update_service.h
+++ b/chrome/browser/download/bubble/download_bubble_update_service.h
@@ -208,8 +208,8 @@

// Removes item if we already have the iterator to it. Returns next iterator.
template <typename Id, typename Item>
- SortedItems<Item>::iterator RemoveItemFromCacheByIter(
- SortedItems<Item>::iterator iter,
+ typename SortedItems<Item>::iterator RemoveItemFromCacheByIter(
+ typename SortedItems<Item>::iterator iter,
SortedItems<Item>& cache,
IterMap<Id, Item>& iter_map);

--- a/chrome/browser/download/bubble/download_bubble_update_service.cc
+++ b/chrome/browser/download/bubble/download_bubble_update_service.cc
@@ -87,7 +87,7 @@
// Helper to get an iterator to the last element in the cache. The cache
// must not be empty.
template <typename Item>
-SortedItems<Item>::iterator GetLastIter(SortedItems<Item>& cache) {
+typename SortedItems<Item>::iterator GetLastIter(SortedItems<Item>& cache) {
CHECK(!cache.empty());
auto it = cache.end();
return std::prev(it);
@@ -789,9 +789,9 @@
}

template <typename Id, typename Item>
-SortedItems<Item>::iterator
+typename SortedItems<Item>::iterator
DownloadBubbleUpdateService::RemoveItemFromCacheByIter(
- SortedItems<Item>::iterator iter,
+ typename SortedItems<Item>::iterator iter,
SortedItems<Item>& cache,
IterMap<Id, Item>& iter_map) {
CHECK(iter != cache.end());
38 changes: 38 additions & 0 deletions common-files/chromium-patches/angle-fix-specialization/5672.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
--- a/third_party/angle/src/libANGLE/renderer/vulkan/MemoryTracking.h
+++ b/third_party/angle/src/libANGLE/renderer/vulkan/MemoryTracking.h
@@ -123,6 +123,20 @@
};
} // namespace vk

+} // namespace rx
+
+// Introduce std::hash for MemoryAllocInfoMapKey.
+namespace std
+{
+template <>
+struct hash<rx::vk::MemoryAllocInfoMapKey>
+{
+ size_t operator()(const rx::vk::MemoryAllocInfoMapKey &key) const { return key.hash(); }
+};
+} // namespace std
+
+namespace rx
+{
// Memory tracker for allocations and deallocations, which is used in RendererVk.
class MemoryAllocationTracker : angle::NonCopyable
{
@@ -202,14 +216,4 @@
};
} // namespace rx

-// Introduce std::hash for MemoryAllocInfoMapKey.
-namespace std
-{
-template <>
-struct hash<rx::vk::MemoryAllocInfoMapKey>
-{
- size_t operator()(const rx::vk::MemoryAllocInfoMapKey &key) const { return key.hash(); }
-};
-} // namespace std
-
#endif // LIBANGLE_RENDERER_VULKAN_MEMORYTRACKING_H_
Loading

0 comments on commit 7822419

Please sign in to comment.