On 25/05/26 11:00 +0200, Matthieu Herrb wrote: > Hi, > > Same diff as for firefox, based on robert@'s code/suggestions. Make > screen sharing use the XSham 1.2 extension which is compatible wih > the default chromium pledge. > > ok, comments ? go ahead for all chromium ports > Index: Makefile > =================================================================== > RCS file: /cvs/OpenBSD/ports/www/chromium/Makefile,v > diff -u -p -u -r1.906 Makefile > --- Makefile 20 May 2026 12:17:05 -0000 1.906 > +++ Makefile 25 May 2026 08:58:04 -0000 > @@ -13,6 +13,7 @@ DPB_PROPERTIES+= lonesome > COMMENT= Chromium browser > > V= 148.0.7778.178 > +REVISION= 0 > > DISTNAME= chromium-${V} > > Index: patches/patch-third_party_webrtc_modules_desktop_capture_BUILD_gn > =================================================================== > RCS file: patches/patch-third_party_webrtc_modules_desktop_capture_BUILD_gn > diff -N patches/patch-third_party_webrtc_modules_desktop_capture_BUILD_gn > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ patches/patch-third_party_webrtc_modules_desktop_capture_BUILD_gn 25 May 2026 08:58:06 -0000 > @@ -0,0 +1,12 @@ > +Index: third_party/webrtc/modules/desktop_capture/BUILD.gn > +--- third_party/webrtc/modules/desktop_capture/BUILD.gn.orig > ++++ third_party/webrtc/modules/desktop_capture/BUILD.gn > +@@ -424,6 +424,8 @@ rtc_library("desktop_capture") { > + > + "Xrender", > + "Xtst", > ++ "xcb-shm", > ++ "X11-xcb", > + ] > + } > + > Index: patches/patch-third_party_webrtc_modules_desktop_capture_linux_x11_x_server_pixel_buffer_cc > =================================================================== > RCS file: /cvs/OpenBSD/ports/www/chromium/patches/patch-third_party_webrtc_modules_desktop_capture_linux_x11_x_server_pixel_buffer_cc,v > diff -u -p -u -r1.6 patch-third_party_webrtc_modules_desktop_capture_linux_x11_x_server_pixel_buffer_cc > --- patches/patch-third_party_webrtc_modules_desktop_capture_linux_x11_x_server_pixel_buffer_cc 11 Aug 2025 08:06:06 -0000 1.6 > +++ patches/patch-third_party_webrtc_modules_desktop_capture_linux_x11_x_server_pixel_buffer_cc 25 May 2026 08:58:06 -0000 > @@ -1,16 +1,134 @@ > +Use XShm 1.2 on OpenBSD for webrtc display sharing > + > Index: third_party/webrtc/modules/desktop_capture/linux/x11/x_server_pixel_buffer.cc > --- third_party/webrtc/modules/desktop_capture/linux/x11/x_server_pixel_buffer.cc.orig > +++ third_party/webrtc/modules/desktop_capture/linux/x11/x_server_pixel_buffer.cc > -@@ -212,6 +212,12 @@ bool XServerPixelBuffer::Init(XAtomCache* cache, Windo > - void XServerPixelBuffer::InitShm(const XWindowAttributes& attributes) { > - Visual* default_visual = attributes.visual; > - int default_depth = attributes.depth; > -+#if defined(__OpenBSD__) > -+// pledge(2) > -+ RTC_LOG(LS_WARNING) << "Unable to use shmget(2) while using pledge(2). " > -+ "Performance may be degraded."; > -+ return; > +@@ -17,6 +17,13 @@ > + #include <sys/ipc.h> > + #include <sys/shm.h> > + > ++#if defined(__OpenBSD__) > ++#include <X11/Xlib-xcb.h> > ++#include <xcb/shm.h> > ++#include <sys/mman.h> > ++#include <unistd.h> > ++
No comments:
Post a Comment