[lfs-patches] r3594 - trunk/chromium

dj at higgs.linuxfromscratch.org dj at higgs.linuxfromscratch.org
Sat Jun 24 18:56:07 PDT 2017


Author: dj
Date: Sat Jun 24 18:56:07 2017
New Revision: 3594

Log:
Add chromium-59.0.3071.109 patches.

Added:
   trunk/chromium/chromium-59.0.3071.109-gcc7-1.patch
   trunk/chromium/chromium-59.0.3071.109-kernel_dmabuf-1.patch
   trunk/chromium/chromium-59.0.3071.109-system_ffmpeg-1.patch

Added: trunk/chromium/chromium-59.0.3071.109-gcc7-1.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/chromium/chromium-59.0.3071.109-gcc7-1.patch	Sat Jun 24 18:56:07 2017	(r3594)
@@ -0,0 +1,158 @@
+Submitted By:            DJ Lucas <dj_AT_linuxfromscratch_DOT_org>
+Date:                    2017-06-25
+Initial Package Version: 59.0.3071.109
+Upstream Status:         Committed
+Origin:                  Arch Linux (Rediffed from Arch PKGBUILD)
+Description:             Allows building with GCC-7.1.0.
+
+diff -Naurp chromium-59.0.3071.109-orig/third_party/WebKit/Source/platform/graphics/gpu/SharedGpuContext.h chromium-59.0.3071.109/third_party/WebKit/Source/platform/graphics/gpu/SharedGpuContext.h
+--- chromium-59.0.3071.109-orig/third_party/WebKit/Source/platform/graphics/gpu/SharedGpuContext.h	2017-06-23 23:24:46.243527971 -0500
++++ chromium-59.0.3071.109/third_party/WebKit/Source/platform/graphics/gpu/SharedGpuContext.h	2017-06-23 23:25:00.423540078 -0500
+@@ -5,6 +5,7 @@
+ #include "platform/PlatformExport.h"
+ #include "platform/wtf/ThreadSpecific.h"
+ 
++#include <functional>
+ #include <memory>
+ 
+ namespace gpu {
+diff -Naurp chromium-59.0.3071.109-orig/third_party/WebKit/Source/platform/wtf/LinkedHashSet.h chromium-59.0.3071.109/third_party/WebKit/Source/platform/wtf/LinkedHashSet.h
+--- chromium-59.0.3071.109-orig/third_party/WebKit/Source/platform/wtf/LinkedHashSet.h	2017-06-23 23:24:46.290194679 -0500
++++ chromium-59.0.3071.109/third_party/WebKit/Source/platform/wtf/LinkedHashSet.h	2017-06-23 23:25:00.423540078 -0500
+@@ -685,6 +685,31 @@ inline LinkedHashSet<T, U, V, W>& Linked
+   return *this;
+ }
+ 
++inline void SwapAnchor(LinkedHashSetNodeBase& a, LinkedHashSetNodeBase& b) {
++  DCHECK(a.prev_);
++  DCHECK(a.next_);
++  DCHECK(b.prev_);
++  DCHECK(b.next_);
++  swap(a.prev_, b.prev_);
++  swap(a.next_, b.next_);
++  if (b.next_ == &a) {
++    DCHECK_EQ(b.prev_, &a);
++    b.next_ = &b;
++    b.prev_ = &b;
++  } else {
++    b.next_->prev_ = &b;
++    b.prev_->next_ = &b;
++  }
++  if (a.next_ == &b) {
++    DCHECK_EQ(a.prev_, &b);
++    a.next_ = &a;
++    a.prev_ = &a;
++  } else {
++    a.next_->prev_ = &a;
++    a.prev_->next_ = &a;
++  }
++}
++
+ template <typename T, typename U, typename V, typename W>
+ inline void LinkedHashSet<T, U, V, W>::Swap(LinkedHashSet& other) {
+   impl_.Swap(other.impl_);
+@@ -877,31 +902,6 @@ inline void LinkedHashSet<T, U, V, W>::e
+   erase(Find(value));
+ }
+ 
+-inline void SwapAnchor(LinkedHashSetNodeBase& a, LinkedHashSetNodeBase& b) {
+-  DCHECK(a.prev_);
+-  DCHECK(a.next_);
+-  DCHECK(b.prev_);
+-  DCHECK(b.next_);
+-  swap(a.prev_, b.prev_);
+-  swap(a.next_, b.next_);
+-  if (b.next_ == &a) {
+-    DCHECK_EQ(b.prev_, &a);
+-    b.next_ = &b;
+-    b.prev_ = &b;
+-  } else {
+-    b.next_->prev_ = &b;
+-    b.prev_->next_ = &b;
+-  }
+-  if (a.next_ == &b) {
+-    DCHECK_EQ(a.prev_, &b);
+-    a.next_ = &a;
+-    a.prev_ = &a;
+-  } else {
+-    a.next_->prev_ = &a;
+-    a.prev_->next_ = &a;
+-  }
+-}
+-
+ inline void swap(LinkedHashSetNodeBase& a, LinkedHashSetNodeBase& b) {
+   DCHECK_NE(a.next_, &a);
+   DCHECK_NE(b.next_, &b);
+diff -Naurp chromium-59.0.3071.109-orig/v8/src/objects/hash-table.h chromium-59.0.3071.109/v8/src/objects/hash-table.h
+--- chromium-59.0.3071.109-orig/v8/src/objects/hash-table.h	2017-06-23 23:24:36.936852720 -0500
++++ chromium-59.0.3071.109/v8/src/objects/hash-table.h	2017-06-23 23:25:08.363546353 -0500
+@@ -135,22 +135,10 @@ class HashTable : public HashTableBase {
+  public:
+   typedef Shape ShapeT;
+ 
+-  // Wrapper methods
+-  inline uint32_t Hash(Key key) {
+-    if (Shape::UsesSeed) {
+-      return Shape::SeededHash(key, GetHeap()->HashSeed());
+-    } else {
+-      return Shape::Hash(key);
+-    }
+-  }
+-
+-  inline uint32_t HashForObject(Key key, Object* object) {
+-    if (Shape::UsesSeed) {
+-      return Shape::SeededHashForObject(key, GetHeap()->HashSeed(), object);
+-    } else {
+-      return Shape::HashForObject(key, object);
+-    }
+-  }
++  // Wrapper methods.  Defined in src/objects-inl.h
++  // to break a cycle with src/heap/heap.h.
++  inline uint32_t Hash(Key key);
++  inline uint32_t HashForObject(Key key, Object* object);
+ 
+   // Returns a new HashTable object.
+   MUST_USE_RESULT static Handle<Derived> New(
+diff -Naurp chromium-59.0.3071.109-orig/v8/src/objects-body-descriptors.h chromium-59.0.3071.109/v8/src/objects-body-descriptors.h
+--- chromium-59.0.3071.109-orig/v8/src/objects-body-descriptors.h	2017-06-23 23:24:36.936852720 -0500
++++ chromium-59.0.3071.109/v8/src/objects-body-descriptors.h	2017-06-23 23:25:08.363546353 -0500
+@@ -99,7 +99,7 @@ class FixedBodyDescriptor final : public
+ 
+   template <typename StaticVisitor>
+   static inline void IterateBody(HeapObject* obj, int object_size) {
+-    IterateBody(obj);
++    IterateBody<StaticVisitor>(obj);
+   }
+ };
+ 
+diff -Naurp chromium-59.0.3071.109-orig/v8/src/objects-inl.h chromium-59.0.3071.109/v8/src/objects-inl.h
+--- chromium-59.0.3071.109-orig/v8/src/objects-inl.h	2017-06-23 23:24:36.943519393 -0500
++++ chromium-59.0.3071.109/v8/src/objects-inl.h	2017-06-23 23:25:08.363546353 -0500
+@@ -46,6 +46,27 @@
+ namespace v8 {
+ namespace internal {
+ 
++template <typename Derived, typename Shape, typename Key>
++uint32_t HashTable<Derived, Shape, Key>::Hash(Key key) {
++  if (Shape::UsesSeed) {
++    return Shape::SeededHash(key, GetHeap()->HashSeed());
++  } else {
++    return Shape::Hash(key);
++  }
++}
++
++
++template <typename Derived, typename Shape, typename Key>
++uint32_t HashTable<Derived, Shape, Key>::HashForObject(Key key,
++                                                       Object* object) {
++  if (Shape::UsesSeed) {
++    return Shape::SeededHashForObject(key, GetHeap()->HashSeed(), object);
++  } else {
++    return Shape::HashForObject(key, object);
++  }
++}
++
++
+ PropertyDetails::PropertyDetails(Smi* smi) {
+   value_ = smi->value();
+ }

Added: trunk/chromium/chromium-59.0.3071.109-kernel_dmabuf-1.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/chromium/chromium-59.0.3071.109-kernel_dmabuf-1.patch	Sat Jun 24 18:56:07 2017	(r3594)
@@ -0,0 +1,95 @@
+Submitted By:            DJ Lucas <dj_AT_linuxfromscratch_DOT_org>
+Date:                    2017-06-25
+Initial Package Version: 59.0.3027.109
+Upstream Status:         Committed
+Origin:                  https://codereview.chromium.org/2805503003 and
+                         https://codereview.chromium.org/2851803002
+Description:             Allows building with kernel versions above 4.6.
+
+diff -Naurp chromium-59.0.3071.109-orig/ui/gfx/linux/client_native_pixmap_dmabuf.cc chromium-59.0.3071.109/ui/gfx/linux/client_native_pixmap_dmabuf.cc
+--- chromium-59.0.3071.109-orig/ui/gfx/linux/client_native_pixmap_dmabuf.cc	2017-06-23 21:55:59.459660758 -0500
++++ chromium-59.0.3071.109/ui/gfx/linux/client_native_pixmap_dmabuf.cc	2017-06-23 21:57:42.976420267 -0500
+@@ -7,36 +7,35 @@
+ #include <fcntl.h>
+ #include <linux/version.h>
+ #include <stddef.h>
++#include <sys/ioctl.h>
+ #include <sys/mman.h>
+ #include <xf86drm.h>
+ 
+ #include "base/debug/crash_logging.h"
+ #include "base/memory/ptr_util.h"
++#include "base/posix/eintr_wrapper.h"
+ #include "base/process/memory.h"
+ #include "base/process/process_metrics.h"
+ #include "base/strings/stringprintf.h"
+ #include "base/trace_event/trace_event.h"
+ 
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
++#include <linux/dma-buf.h>
++#else
+ #include <linux/types.h>
+ 
+-struct local_dma_buf_sync {
++struct dma_buf_sync {
+   __u64 flags;
+ };
+ 
+-#define LOCAL_DMA_BUF_SYNC_READ (1 << 0)
+-#define LOCAL_DMA_BUF_SYNC_WRITE (2 << 0)
+-#define LOCAL_DMA_BUF_SYNC_RW \
+-  (LOCAL_DMA_BUF_SYNC_READ | LOCAL_DMA_BUF_SYNC_WRITE)
+-#define LOCAL_DMA_BUF_SYNC_START (0 << 2)
+-#define LOCAL_DMA_BUF_SYNC_END (1 << 2)
+-
+-#define LOCAL_DMA_BUF_BASE 'b'
+-#define LOCAL_DMA_BUF_IOCTL_SYNC \
+-  _IOW(LOCAL_DMA_BUF_BASE, 0, struct local_dma_buf_sync)
++#define DMA_BUF_SYNC_READ (1 << 0)
++#define DMA_BUF_SYNC_WRITE (2 << 0)
++#define DMA_BUF_SYNC_RW (DMA_BUF_SYNC_READ | DMA_BUF_SYNC_WRITE)
++#define DMA_BUF_SYNC_START (0 << 2)
++#define DMA_BUF_SYNC_END (1 << 2)
+ 
+-#else
+-#include <linux/dma-buf.h>
++#define DMA_BUF_BASE 'b'
++#define DMA_BUF_IOCTL_SYNC _IOW(DMA_BUF_BASE, 0, struct dma_buf_sync)
+ #endif
+ 
+ namespace gfx {
+@@ -44,25 +43,19 @@ namespace gfx {
+ namespace {
+ 
+ void PrimeSyncStart(int dmabuf_fd) {
+-  struct local_dma_buf_sync sync_start = {0};
++  struct dma_buf_sync sync_start = {0};
+ 
+-  sync_start.flags = LOCAL_DMA_BUF_SYNC_START | LOCAL_DMA_BUF_SYNC_RW;
+-#if DCHECK_IS_ON()
+-  int rv =
+-#endif
+-      drmIoctl(dmabuf_fd, LOCAL_DMA_BUF_IOCTL_SYNC, &sync_start);
+-  DPLOG_IF(ERROR, rv) << "Failed DMA_BUF_SYNC_START";
++  sync_start.flags = DMA_BUF_SYNC_START | DMA_BUF_SYNC_RW;
++  int rv = HANDLE_EINTR(ioctl(dmabuf_fd, DMA_BUF_IOCTL_SYNC, &sync_start));
++  PLOG_IF(ERROR, rv) << "Failed DMA_BUF_SYNC_START";
+ }
+ 
+ void PrimeSyncEnd(int dmabuf_fd) {
+-  struct local_dma_buf_sync sync_end = {0};
++  struct dma_buf_sync sync_end = {0};
+ 
+-  sync_end.flags = LOCAL_DMA_BUF_SYNC_END | LOCAL_DMA_BUF_SYNC_RW;
+-#if DCHECK_IS_ON()
+-  int rv =
+-#endif
+-      drmIoctl(dmabuf_fd, LOCAL_DMA_BUF_IOCTL_SYNC, &sync_end);
+-  DPLOG_IF(ERROR, rv) << "Failed DMA_BUF_SYNC_END";
++  sync_end.flags = DMA_BUF_SYNC_END | DMA_BUF_SYNC_RW;
++  int rv = HANDLE_EINTR(ioctl(dmabuf_fd, DMA_BUF_IOCTL_SYNC, &sync_end));
++  PLOG_IF(ERROR, rv) << "Failed DMA_BUF_SYNC_END";
+ }
+ 
+ }  // namespace

Added: trunk/chromium/chromium-59.0.3071.109-system_ffmpeg-1.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/chromium/chromium-59.0.3071.109-system_ffmpeg-1.patch	Sat Jun 24 18:56:07 2017	(r3594)
@@ -0,0 +1,63 @@
+Submitted By:            DJ Lucas <dj_AT_linuxfromscratch_DOT_org>
+Date:                    2017-06-25
+Initial Package Version: 57.0.2987.110
+Upstream Status:         Not submitted
+Origin:                  Gentoo: https://gitweb.gentoo.org/repo/gentoo.git/plain/www-client/chromium/files/chromium-system-ffmpeg-r4.patch
+Description:             Allows building with system provided ffmpeg. Rediffed
+                         for chromium-59.0.3071.109.
+
+diff -Naurp chromium-59.0.3071.109-orig/media/ffmpeg/ffmpeg_common.h chromium-59.0.3071.109/media/ffmpeg/ffmpeg_common.h
+--- chromium-59.0.3071.109-orig/media/ffmpeg/ffmpeg_common.h	2017-06-20 17:03:19.000000000 -0500
++++ chromium-59.0.3071.109/media/ffmpeg/ffmpeg_common.h	2017-06-23 00:21:10.551912699 -0500
+@@ -23,10 +23,6 @@
+ 
+ // Include FFmpeg header files.
+ extern "C" {
+-// Disable deprecated features which result in spammy compile warnings.  This
+-// list of defines must mirror those in the 'defines' section of FFmpeg's
+-// BUILD.gn file or the headers below will generate different structures!
+-#define FF_API_CONVERGENCE_DURATION 0
+ // Upstream libavcodec/utils.c still uses the deprecated
+ // av_dup_packet(), causing deprecation warnings.
+ // The normal fix for such things is to disable the feature as below,
+@@ -40,7 +36,6 @@ extern "C" {
+ MSVC_PUSH_DISABLE_WARNING(4244);
+ #include <libavcodec/avcodec.h>
+ #include <libavformat/avformat.h>
+-#include <libavformat/internal.h>
+ #include <libavformat/avio.h>
+ #include <libavutil/avutil.h>
+ #include <libavutil/imgutils.h>
+diff -Naurp chromium-59.0.3071.109-orig/media/filters/ffmpeg_demuxer.cc chromium-59.0.3071.109/media/filters/ffmpeg_demuxer.cc
+--- chromium-59.0.3071.109-orig/media/filters/ffmpeg_demuxer.cc	2017-06-20 17:03:19.000000000 -0500
++++ chromium-59.0.3071.109/media/filters/ffmpeg_demuxer.cc	2017-06-23 00:22:56.289311692 -0500
+@@ -1223,29 +1223,6 @@ void FFmpegDemuxer::OnFindStreamInfoDone
+   // If no estimate is found, the stream entry will be kInfiniteDuration.
+   std::vector<base::TimeDelta> start_time_estimates(format_context->nb_streams,
+                                                     kInfiniteDuration);
+-  const AVFormatInternal* internal = format_context->internal;
+-  if (internal && internal->packet_buffer &&
+-      format_context->start_time != static_cast<int64_t>(AV_NOPTS_VALUE)) {
+-    struct AVPacketList* packet_buffer = internal->packet_buffer;
+-    while (packet_buffer != internal->packet_buffer_end) {
+-      DCHECK_LT(static_cast<size_t>(packet_buffer->pkt.stream_index),
+-                start_time_estimates.size());
+-      const AVStream* stream =
+-          format_context->streams[packet_buffer->pkt.stream_index];
+-      if (packet_buffer->pkt.pts != static_cast<int64_t>(AV_NOPTS_VALUE)) {
+-        const base::TimeDelta packet_pts =
+-            ConvertFromTimeBase(stream->time_base, packet_buffer->pkt.pts);
+-        // We ignore kNoTimestamp here since -int64_t::min() is possible; see
+-        // https://crbug.com/700501. Technically this is a valid value, but in
+-        // practice shouldn't occur, so just ignore it when estimating.
+-        if (packet_pts != kNoTimestamp && packet_pts != kInfiniteDuration &&
+-            packet_pts < start_time_estimates[stream->index]) {
+-          start_time_estimates[stream->index] = packet_pts;
+-        }
+-      }
+-      packet_buffer = packet_buffer->next;
+-    }
+-  }
+ 
+   std::unique_ptr<MediaTracks> media_tracks(new MediaTracks());
+ 


More information about the patches mailing list