mirror of
https://git.freebsd.org/ports.git
synced 2025-06-08 06:10:30 -04:00
Changelog: https://chromium.googlesource.com/chromium/src/+log/75.0.3770.142..76.0.3809.100?pretty=fuller&n=10000 Submitted by: Matthias Wolf <matthias@rheinwolf.de> MFH: 2019Q3
47 lines
1.6 KiB
C++
47 lines
1.6 KiB
C++
--- ui/gfx/native_pixmap_handle.cc.orig 2019-07-24 18:59:22 UTC
|
|
+++ ui/gfx/native_pixmap_handle.cc
|
|
@@ -8,7 +8,7 @@
|
|
|
|
#include "build/build_config.h"
|
|
|
|
-#if defined(OS_LINUX)
|
|
+#if defined(OS_LINUX) || defined(OS_BSD)
|
|
#include <drm_fourcc.h>
|
|
#include "base/posix/eintr_wrapper.h"
|
|
#endif
|
|
@@ -20,7 +20,7 @@
|
|
|
|
namespace gfx {
|
|
|
|
-#if defined(OS_LINUX)
|
|
+#if defined(OS_LINUX) || defined(OS_BSD)
|
|
static_assert(NativePixmapHandle::kNoModifier == DRM_FORMAT_MOD_INVALID,
|
|
"gfx::NativePixmapHandle::kNoModifier should be an alias for"
|
|
"DRM_FORMAT_MOD_INVALID");
|
|
@@ -31,7 +31,7 @@ NativePixmapPlane::NativePixmapPlane() : stride(0), of
|
|
NativePixmapPlane::NativePixmapPlane(int stride,
|
|
int offset,
|
|
uint64_t size
|
|
-#if defined(OS_LINUX)
|
|
+#if defined(OS_LINUX) || defined(OS_BSD)
|
|
,
|
|
base::ScopedFD fd
|
|
#elif defined(OS_FUCHSIA)
|
|
@@ -42,7 +42,7 @@ NativePixmapPlane::NativePixmapPlane(int stride,
|
|
: stride(stride),
|
|
offset(offset),
|
|
size(size)
|
|
-#if defined(OS_LINUX)
|
|
+#if defined(OS_LINUX) || defined(OS_BSD)
|
|
,
|
|
fd(std::move(fd))
|
|
#elif defined(OS_FUCHSIA)
|
|
@@ -70,7 +70,7 @@ NativePixmapHandle& NativePixmapHandle::operator=(Nati
|
|
NativePixmapHandle CloneHandleForIPC(const NativePixmapHandle& handle) {
|
|
NativePixmapHandle clone;
|
|
for (auto& plane : handle.planes) {
|
|
-#if defined(OS_LINUX)
|
|
+#if defined(OS_LINUX) || defined(OS_BSD)
|
|
DCHECK(plane.fd.is_valid());
|
|
base::ScopedFD fd_dup(HANDLE_EINTR(dup(plane.fd.get())));
|
|
if (!fd_dup.is_valid()) {
|