Merge ~hectorcao/chromium-browser:dev-update-from-intel into ~chromium-team/chromium-browser/+git/snap-from-source:hwacc-beta

Proposed by Hector CAO
Status: Merged
Merged at revision: 42e1958d2cc156ade4aa231b039f4b8aa87bf1aa
Proposed branch: ~hectorcao/chromium-browser:dev-update-from-intel
Merge into: ~chromium-team/chromium-browser/+git/snap-from-source:hwacc-beta
Diff against target: 610 lines (+104/-117)
8 files modified
build/chromium-patches/optimization/topic-intel/1937d60:one-copy.diff (+32/-52)
build/chromium-patches/optimization/topic-intel/22fe045d:linux-unstable-deb.diff (+5/-5)
build/chromium-patches/optimization/topic-intel/4ed5da1:vaapi-flag-ozone-wayland.diff (+7/-7)
build/chromium-patches/optimization/topic-intel/7be5b21:zero-copy.diff (+32/-23)
build/chromium-patches/optimization/topic-intel/8cd198e4:enable-vda-video-encoder-on-wayland.diff (+3/-3)
build/chromium-patches/optimization/topic-intel/faf232f:dynamic-check-nv12.diff (+16/-15)
build/chromium-patches/series (+6/-6)
launcher/chromium.launcher (+3/-6)
Reviewer Review Type Date Requested Status
Nathan Teodosio Needs Information
Review via email: mp+441543@code.launchpad.net

Commit message

Update chromium flags and patch

New topic : https://chromium-review.googlesource.com/q/topic:%22le-tot%22
Fix the issue of one-copy that breaks chromium on GNOME/XOrg

To post a comment you must log in.
Revision history for this message
Hector CAO (hectorcao) :
Revision history for this message
Nathan Teodosio (nteodosio) wrote :

There are no actual changes in

- enable-vda-video-encoder-on-wayland.diff
- linux-unstable-deb.diff

Why are they included?

Revision history for this message
Nathan Teodosio (nteodosio) :
review: Needs Information
Revision history for this message
Hector CAO (hectorcao) wrote :

> There are no actual changes in
>
> - enable-vda-video-encoder-on-wayland.diff
> - linux-unstable-deb.diff
>
> Why are they included?

They should have changes, at least in git commit hash, i will fix

Revision history for this message
Nathan Teodosio (nteodosio) wrote :

Yes, their changes are only commit hashes and such metadata, I think it is potentially confusing in the future to read git logs and such that those will show up as changes.

Revision history for this message
Hector CAO (hectorcao) wrote :

> Yes, their changes are only commit hashes and such metadata, I think it is
> potentially confusing in the future to read git logs and such that those will
> show up as changes.

I double checked, in fact, it was intentional, i want to use the patches as they are in the topic (commit hashes and metadata), it is easier for us to follow.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/build/chromium-patches/optimization/topic-intel/ad27bcd:one-copy.diff b/build/chromium-patches/optimization/topic-intel/1937d60:one-copy.diff
2similarity index 86%
3rename from build/chromium-patches/optimization/topic-intel/ad27bcd:one-copy.diff
4rename to build/chromium-patches/optimization/topic-intel/1937d60:one-copy.diff
5index 869ceab..7f589b5 100644
6--- a/build/chromium-patches/optimization/topic-intel/ad27bcd:one-copy.diff
7+++ b/build/chromium-patches/optimization/topic-intel/1937d60:one-copy.diff
8@@ -1,21 +1,20 @@
9-From ad27bcdb6b8a38d3ec0a7b7dabc9f81a82c4f26c Mon Sep 17 00:00:00 2001
10+From 1937d6067bf5b24728b64e5f09f07c00dc348073 Mon Sep 17 00:00:00 2001
11 From: Yaowei Zhou <yaowei.zhou@intel.com>
12-Date: Fri, 03 Mar 2023 09:56:09 +0800
13-Subject: [PATCH] Add One-copy for Linux Video Capture
14+Date: Thu, 20 Apr 2023 13:31:34 +0800
15+Subject: [PATCH] [Duplicate] Add the one-copy for Linux* video capture
16
17-Enable the gpu memory buffer with NV12 format of Linux camera capture path for local view and video encode.
18+Duplicate the "Add one-copy for Linux* video capture" before upstream
19+done.
20
21-Design Doc: https://docs.google.com/document/d/1_9ABHX-effg5WD5sC3J1mDXiYaU4zZnf/edit
22-
23-Bug: 1374150
24-Change-Id: I3afff1c45f47e7c7141bd4bdcdf1811ea0906349
25+Bug: N/A
26+Change-Id: Idfe932f495dd717954b596ef5c49981de510e382
27 ---
28
29 diff --git a/content/browser/utility_process_host.cc b/content/browser/utility_process_host.cc
30-index fe0b513..77cdee8 100644
31+index d2bd22ce..6e29181 100644
32 --- a/content/browser/utility_process_host.cc
33 +++ b/content/browser/utility_process_host.cc
34-@@ -60,6 +60,11 @@
35+@@ -69,6 +69,11 @@
36 #include "media/capture/capture_switches.h"
37 #endif
38
39@@ -26,11 +25,12 @@ index fe0b513..77cdee8 100644
40 +
41 namespace content {
42
43- UtilityMainThreadFactoryFunction g_utility_main_thread_factory = nullptr;
44-@@ -355,6 +360,17 @@
45- file_data_->files_to_preload.merge(GetV8SnapshotFilesToPreload());
46- #endif // BUILDFLAG(IS_POSIX)
47-
48+ namespace {
49+@@ -408,6 +413,16 @@
50+ file_data_->files_to_preload[kNetworkContextParentDirsDescriptor] =
51+ PassNetworkContextParentDirs(std::move(network_context_parent_dirs));
52+ }
53++#endif
54 +#if BUILDFLAG(IS_LINUX)
55 + if (metrics_name_ == video_capture::mojom::VideoCaptureService::Name_) {
56 + if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
57@@ -40,16 +40,14 @@ index fe0b513..77cdee8 100644
58 + cmd_line->AppendSwitch(switches::kVideoCaptureUseGpuMemoryBuffer);
59 + }
60 + }
61-+#endif
62-+
63+ #endif // BUILDFLAG(IS_LINUX)
64+
65 std::unique_ptr<UtilitySandboxedProcessLauncherDelegate> delegate =
66- std::make_unique<UtilitySandboxedProcessLauncherDelegate>(
67- sandbox_type_, env_, *cmd_line);
68 diff --git a/media/capture/BUILD.gn b/media/capture/BUILD.gn
69-index 3e6bfcb..76c9384 100644
70+index b56936b..3d88a96 100644
71 --- a/media/capture/BUILD.gn
72 +++ b/media/capture/BUILD.gn
73-@@ -274,6 +274,17 @@
74+@@ -272,6 +272,17 @@
75 ]
76 }
77
78@@ -68,11 +66,11 @@ index 3e6bfcb..76c9384 100644
79 sources += [
80 "video/chromeos/camera_3a_controller.cc",
81 diff --git a/media/capture/video/linux/v4l2_capture_delegate.cc b/media/capture/video/linux/v4l2_capture_delegate.cc
82-index c447d607..a72e9e3 100644
83+index 864111f..c44cbfd 100644
84 --- a/media/capture/video/linux/v4l2_capture_delegate.cc
85 +++ b/media/capture/video/linux/v4l2_capture_delegate.cc
86-@@ -23,8 +23,10 @@
87- #include "media/base/bind_to_current_loop.h"
88+@@ -22,8 +22,10 @@
89+ #include "build/build_config.h"
90 #include "media/base/video_frame.h"
91 #include "media/base/video_types.h"
92 +#include "media/capture/capture_switches.h"
93@@ -82,7 +80,7 @@ index c447d607..a72e9e3 100644
94 #include "media/capture/video/linux/video_capture_device_linux.h"
95
96 using media::mojom::MeteringMode;
97-@@ -248,7 +250,12 @@
98+@@ -265,7 +267,12 @@
99 device_fd_(v4l2),
100 is_capturing_(false),
101 timeout_count_(0),
102@@ -96,7 +94,7 @@ index c447d607..a72e9e3 100644
103
104 void V4L2CaptureDelegate::AllocateAndStart(
105 int width,
106-@@ -366,7 +373,6 @@
107+@@ -383,7 +390,6 @@
108 video_fmt_.fmt.pix.height);
109 capture_format_.frame_rate = frame_rate;
110 capture_format_.pixel_format = pixel_format;
111@@ -104,7 +102,7 @@ index c447d607..a72e9e3 100644
112 if (!StartStream())
113 return;
114
115-@@ -950,10 +956,17 @@
116+@@ -1110,10 +1116,17 @@
117 // matrix = v4l2_format->fmt.pix.ycbcr_enc;
118 // transfer = v4l2_format->fmt.pix.xfer_func;
119 // See http://crbug.com/959919.
120@@ -127,10 +125,10 @@ index c447d607..a72e9e3 100644
121
122 while (!take_photo_callbacks_.empty()) {
123 diff --git a/media/capture/video/linux/v4l2_capture_delegate.h b/media/capture/video/linux/v4l2_capture_delegate.h
124-index a237df51..f3cb693 100644
125+index c9be3d0..38d54b2 100644
126 --- a/media/capture/video/linux/v4l2_capture_delegate.h
127 +++ b/media/capture/video/linux/v4l2_capture_delegate.h
128-@@ -138,6 +138,12 @@
129+@@ -144,6 +144,12 @@
130 // Clockwise rotation in degrees. This value should be 0, 90, 180, or 270.
131 int rotation_;
132
133@@ -805,10 +803,10 @@ index 1756e1d..331336d 100644
134 return nullptr;
135 #endif
136 diff --git a/third_party/blink/renderer/platform/video_capture/video_capture_impl.cc b/third_party/blink/renderer/platform/video_capture/video_capture_impl.cc
137-index cb0e699..57b8207 100644
138+index 1a826c9..a7832df 100644
139 --- a/third_party/blink/renderer/platform/video_capture/video_capture_impl.cc
140 +++ b/third_party/blink/renderer/platform/video_capture/video_capture_impl.cc
141-@@ -534,6 +534,7 @@
142+@@ -539,6 +539,7 @@
143 } else {
144 planes.push_back(gfx::BufferPlane::DEFAULT);
145 }
146@@ -816,26 +814,8 @@ index cb0e699..57b8207 100644
147 for (size_t plane = 0; plane < planes.size(); ++plane) {
148 if (should_recreate_shared_image ||
149 buffer_context_->gmb_resources()->mailboxes[plane].IsZero()) {
150-@@ -551,8 +552,15 @@
151- }
152-
153- const unsigned texture_target =
154-- buffer_context_->gpu_factories()->ImageTextureTarget(
155-- gpu_memory_buffer_->GetFormat());
156-+#if BUILDFLAG(IS_LINUX)
157-+ // Explicitly set GL_TEXTURE_EXTERNAL_OES since ImageTextureTarget() will
158-+ // return GL_TEXTURE_2D due to GMB factory not supporting NV12 GMBs.
159-+ (frame_info_->pixel_format == media::PIXEL_FORMAT_NV12)
160-+ ? GL_TEXTURE_EXTERNAL_OES
161-+ :
162-+#endif
163-+ buffer_context_->gpu_factories()->ImageTextureTarget(
164-+ gpu_memory_buffer_->GetFormat());
165-
166- const gpu::SyncToken sync_token = sii->GenVerifiedSyncToken();
167-
168 diff --git a/ui/ozone/public/ozone_platform.cc b/ui/ozone/public/ozone_platform.cc
169-index 0243f94..50347f0f 100644
170+index 6c4ce21..17c100c 100644
171 --- a/ui/ozone/public/ozone_platform.cc
172 +++ b/ui/ozone/public/ozone_platform.cc
173 @@ -91,6 +91,19 @@
174@@ -859,10 +839,10 @@ index 0243f94..50347f0f 100644
175 OzonePlatform* OzonePlatform::GetInstance() {
176 DCHECK(g_instance) << "OzonePlatform is not initialized";
177 diff --git a/ui/ozone/public/ozone_platform.h b/ui/ozone/public/ozone_platform.h
178-index ecfc348..2035034 100644
179+index f61ffe9..4720e7e6 100644
180 --- a/ui/ozone/public/ozone_platform.h
181 +++ b/ui/ozone/public/ozone_platform.h
182-@@ -245,6 +245,12 @@
183+@@ -241,6 +241,12 @@
184 // provided by |args| as with InitalizeForUI.
185 static void InitializeForGPU(const InitParams& args);
186
187diff --git a/build/chromium-patches/optimization/topic-intel/bb6aa463:linux-unstable-deb.diff b/build/chromium-patches/optimization/topic-intel/22fe045d:linux-unstable-deb.diff
188similarity index 79%
189rename from build/chromium-patches/optimization/topic-intel/bb6aa463:linux-unstable-deb.diff
190rename to build/chromium-patches/optimization/topic-intel/22fe045d:linux-unstable-deb.diff
191index f4f2756..4ae23e0 100644
192--- a/build/chromium-patches/optimization/topic-intel/bb6aa463:linux-unstable-deb.diff
193+++ b/build/chromium-patches/optimization/topic-intel/22fe045d:linux-unstable-deb.diff
194@@ -1,10 +1,10 @@
195-From bb6aa4636c23e2e0625a3918ea14995f30aebf01 Mon Sep 17 00:00:00 2001
196+From 22fe045deac0551720d7292022f443b22703f336 Mon Sep 17 00:00:00 2001
197 From: Yaowei Zhou <yaowei.zhou@intel.com>
198-Date: Thu, 02 Feb 2023 14:28:54 +0800
199-Subject: [PATCH] Enable linux:unstable_deb build target when using the chromium minigbm
200+Date: Thu, 20 Apr 2023 14:37:26 +0800
201+Subject: [PATCH] Enable "linux:unstable_deb" build target when using the chromium minigbm
202
203-Bug:N/A
204-Change-Id: Ied6a2d4a8aace6db581d97819e4ce7a346ebd93f
205+Bug: N/A
206+Change-Id: Ic37059be0f0719895acdba756292aed71820feba
207 ---
208
209 diff --git a/third_party/minigbm/BUILD.gn b/third_party/minigbm/BUILD.gn
210diff --git a/build/chromium-patches/optimization/topic-intel/a45401f:vaapi-flag-ozone-wayland.diff b/build/chromium-patches/optimization/topic-intel/4ed5da1:vaapi-flag-ozone-wayland.diff
211similarity index 63%
212rename from build/chromium-patches/optimization/topic-intel/a45401f:vaapi-flag-ozone-wayland.diff
213rename to build/chromium-patches/optimization/topic-intel/4ed5da1:vaapi-flag-ozone-wayland.diff
214index cee3f65..a397b19 100644
215--- a/build/chromium-patches/optimization/topic-intel/a45401f:vaapi-flag-ozone-wayland.diff
216+++ b/build/chromium-patches/optimization/topic-intel/4ed5da1:vaapi-flag-ozone-wayland.diff
217@@ -1,6 +1,6 @@
218-From a45401f804db438f5b82425a6fef1061352f0cdd Mon Sep 17 00:00:00 2001
219-From: Yaowei Zhou <yaowei.zhou@intel.com>
220-Date: Thu, 02 Feb 2023 14:18:34 +0800
221+From 4ed5da1e7e297cc3872594cec173626e78c570e7 Mon Sep 17 00:00:00 2001
222+From: Jianhui Dai <jianhui.j.dai@intel.com>
223+Date: Thu, 14 Jul 2022 13:07:06 +0800
224 Subject: [PATCH] Enable VA-API flag on ozone wayland
225
226 Bug: POC
227@@ -8,12 +8,12 @@ Change-Id: I09f696bfe3be82930161ce005152d1397b93f636
228 ---
229
230 diff --git a/ui/ozone/platform/wayland/ozone_platform_wayland.cc b/ui/ozone/platform/wayland/ozone_platform_wayland.cc
231-index b3190c6b..4a2c3bb 100644
232+index b8f90a13..2181192e 100644
233 --- a/ui/ozone/platform/wayland/ozone_platform_wayland.cc
234 +++ b/ui/ozone/platform/wayland/ozone_platform_wayland.cc
235-@@ -309,6 +309,8 @@
236- properties->supports_global_screen_coordinates =
237- features::IsWaylandScreenCoordinatesEnabled();
238+@@ -289,6 +289,8 @@
239+ // arbitrary position.
240+ properties->supports_global_screen_coordinates = false;
241
242 + properties->supports_vaapi = true;
243 +
244diff --git a/build/chromium-patches/optimization/topic-intel/8c5c7f51:zero-copy.diff b/build/chromium-patches/optimization/topic-intel/7be5b21:zero-copy.diff
245similarity index 92%
246rename from build/chromium-patches/optimization/topic-intel/8c5c7f51:zero-copy.diff
247rename to build/chromium-patches/optimization/topic-intel/7be5b21:zero-copy.diff
248index e951643..62764df 100644
249--- a/build/chromium-patches/optimization/topic-intel/8c5c7f51:zero-copy.diff
250+++ b/build/chromium-patches/optimization/topic-intel/7be5b21:zero-copy.diff
251@@ -1,6 +1,6 @@
252-From 8c5c7f5180416d5f60929189dd05898bdb6ff32b Mon Sep 17 00:00:00 2001
253+From 7be5b21e310c658761cbff3376c2f32f9fd964bb Mon Sep 17 00:00:00 2001
254 From: Yaowei Zhou <yaowei.zhou@intel.com>
255-Date: Fri, 03 Mar 2023 11:56:08 +0800
256+Date: Thu, 20 Apr 2023 14:08:51 +0800
257 Subject: [PATCH] Add the zero-copy for Linux* video capture
258
259 Add the zero-copy supporting for video capture pipeline.
260@@ -10,10 +10,10 @@ Change-Id: Ic9bd08a94b79731750529b35a99f700fcc815e6c
261 ---
262
263 diff --git a/media/capture/BUILD.gn b/media/capture/BUILD.gn
264-index 76c9384..752ffac 100644
265+index 3d88a96..1765c49 100644
266 --- a/media/capture/BUILD.gn
267 +++ b/media/capture/BUILD.gn
268-@@ -278,6 +278,10 @@
269+@@ -276,6 +276,10 @@
270 sources += [
271 "video/linux/v4l2_capture_delegate_gpu_helper.cc",
272 "video/linux/v4l2_capture_delegate_gpu_helper.h",
273@@ -25,10 +25,10 @@ index 76c9384..752ffac 100644
274 "video/linux/v4l2_gpu_memory_buffer_factory.h",
275 "video/linux/v4l2_gpu_memory_buffer_tracker.cc",
276 diff --git a/media/capture/video/linux/v4l2_capture_delegate.cc b/media/capture/video/linux/v4l2_capture_delegate.cc
277-index a72e9e3..638e9e9 100644
278+index c44cbfd..bd47ee3 100644
279 --- a/media/capture/video/linux/v4l2_capture_delegate.cc
280 +++ b/media/capture/video/linux/v4l2_capture_delegate.cc
281-@@ -27,6 +27,7 @@
282+@@ -26,6 +26,7 @@
283 #include "media/capture/mojom/image_capture_types.h"
284 #include "media/capture/video/blob_utils.h"
285 #include "media/capture/video/linux/v4l2_capture_delegate_gpu_helper.h"
286@@ -36,7 +36,7 @@ index a72e9e3..638e9e9 100644
287 #include "media/capture/video/linux/video_capture_device_linux.h"
288
289 using media::mojom::MeteringMode;
290-@@ -52,7 +53,7 @@
291+@@ -51,7 +52,7 @@
292 // buffers by v4l2 driver can be higher or lower than this number.
293 // kNumVideoBuffers should not be too small, or Chrome may not return enough
294 // buffers back to driver in time.
295@@ -45,7 +45,7 @@ index a72e9e3..638e9e9 100644
296 // Timeout in milliseconds v4l2_thread_ blocks waiting for a frame from the hw.
297 // This value has been fine tuned. Before changing or modifying it see
298 // https://crbug.com/470717
299-@@ -65,6 +66,11 @@
300+@@ -64,6 +65,11 @@
301 // Typical framerate, in fps
302 constexpr int kTypicalFramerate = 30;
303
304@@ -57,7 +57,7 @@ index a72e9e3..638e9e9 100644
305 // V4L2 color formats supported by V4L2CaptureDelegate derived classes.
306 // This list is ordered by precedence of use -- but see caveats for MJPEG.
307 struct {
308-@@ -186,6 +192,7 @@
309+@@ -203,6 +209,7 @@
310 DCHECK_LE(payload_size, length_);
311 payload_size_ = payload_size;
312 }
313@@ -65,7 +65,7 @@ index a72e9e3..638e9e9 100644
314
315 private:
316 friend class base::RefCounted<BufferTracker>;
317-@@ -251,7 +258,8 @@
318+@@ -268,7 +275,8 @@
319 is_capturing_(false),
320 timeout_count_(0),
321 rotation_(rotation),
322@@ -75,7 +75,7 @@ index a72e9e3..638e9e9 100644
323 if (use_gpu_buffer_) {
324 v4l2_gpu_helper_ = std::make_unique<V4L2CaptureDelegateGpuHelper>(this);
325 }
326-@@ -297,6 +305,20 @@
327+@@ -314,6 +322,20 @@
328 return;
329 }
330
331@@ -96,7 +96,7 @@ index a72e9e3..638e9e9 100644
332 // Get supported video formats in preferred order. For large resolutions,
333 // favour mjpeg over raw formats.
334 const std::vector<uint32_t>& desired_v4l2_formats =
335-@@ -315,8 +337,8 @@
336+@@ -332,8 +354,8 @@
337 }
338
339 DVLOG(1) << "Chosen pixel format is " << FourccToString(*best);
340@@ -106,7 +106,7 @@ index a72e9e3..638e9e9 100644
341 if (DoIoctl(VIDIOC_S_FMT, &video_fmt_) < 0) {
342 SetErrorState(VideoCaptureError::kV4L2FailedToSetVideoCaptureFormat,
343 FROM_HERE, "Failed to set video capture format");
344-@@ -388,6 +410,11 @@
345+@@ -405,6 +427,11 @@
346 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("video_and_image_capture"),
347 "V4L2CaptureDelegate::StopAndDeAllocate");
348 StopStream();
349@@ -118,7 +118,7 @@ index a72e9e3..638e9e9 100644
350 // At this point we can close the device.
351 // This is also needed for correctly changing settings later via VIDIOC_S_FMT.
352 device_fd_.reset();
353-@@ -672,7 +699,11 @@
354+@@ -731,7 +758,11 @@
355 return weak_factory_.GetWeakPtr();
356 }
357
358@@ -131,7 +131,7 @@ index a72e9e3..638e9e9 100644
359
360 bool V4L2CaptureDelegate::RunIoctl(int request, void* argp) {
361 int num_retries = 0;
362-@@ -914,7 +945,9 @@
363+@@ -1074,7 +1105,9 @@
364 return;
365 }
366
367@@ -142,7 +142,7 @@ index a72e9e3..638e9e9 100644
368 const scoped_refptr<BufferTracker>& buffer_tracker =
369 buffer_tracker_pool_[buffer.index];
370
371-@@ -957,10 +990,9 @@
372+@@ -1117,10 +1150,9 @@
373 // transfer = v4l2_format->fmt.pix.xfer_func;
374 // See http://crbug.com/959919.
375 if (use_gpu_buffer_) {
376@@ -156,7 +156,7 @@ index a72e9e3..638e9e9 100644
377 } else {
378 client_->OnIncomingCapturedData(
379 buffer_tracker->start(), buffer_tracker->payload_size(),
380-@@ -980,11 +1012,12 @@
381+@@ -1140,11 +1172,12 @@
382 if (blob)
383 std::move(cb).Run(std::move(blob));
384 }
385@@ -174,7 +174,7 @@ index a72e9e3..638e9e9 100644
386 }
387 }
388
389-@@ -1028,14 +1061,52 @@
390+@@ -1188,14 +1221,52 @@
391 client_->OnError(error, from_here, reason);
392 }
393
394@@ -231,7 +231,7 @@ index a72e9e3..638e9e9 100644
395 }
396
397 bool V4L2CaptureDelegate::BufferTracker::Init(int fd,
398-@@ -1055,4 +1126,13 @@
399+@@ -1215,4 +1286,13 @@
400 return true;
401 }
402
403@@ -246,10 +246,10 @@ index a72e9e3..638e9e9 100644
404 +
405 } // namespace media
406 diff --git a/media/capture/video/linux/v4l2_capture_delegate.h b/media/capture/video/linux/v4l2_capture_delegate.h
407-index f3cb693..a137716 100644
408+index 38d54b2..0c4ceab 100644
409 --- a/media/capture/video/linux/v4l2_capture_delegate.h
410 +++ b/media/capture/video/linux/v4l2_capture_delegate.h
411-@@ -114,6 +114,15 @@
412+@@ -120,6 +120,15 @@
413 const base::Location& from_here,
414 const std::string& reason);
415
416@@ -265,7 +265,7 @@ index f3cb693..a137716 100644
417 const raw_ptr<V4L2CaptureDevice> v4l2_;
418 const scoped_refptr<base::SingleThreadTaskRunner> v4l2_task_runner_;
419 const VideoCaptureDeviceDescriptor device_descriptor_;
420-@@ -142,6 +151,7 @@
421+@@ -148,6 +157,7 @@
422 class V4L2CaptureDelegateGpuHelper;
423 friend class V4L2CaptureDelegateGpuHelper;
424 bool use_gpu_buffer_;
425@@ -382,7 +382,7 @@ index b1e9b95..80c7710b 100644
426 const uint8_t* sample,
427 size_t sample_size,
428 diff --git a/media/capture/video/linux/v4l2_capture_delegate_gpu_helper.h b/media/capture/video/linux/v4l2_capture_delegate_gpu_helper.h
429-index a627a85..505ce9e 100644
430+index a627a85..b519d42 100644
431 --- a/media/capture/video/linux/v4l2_capture_delegate_gpu_helper.h
432 +++ b/media/capture/video/linux/v4l2_capture_delegate_gpu_helper.h
433 @@ -35,6 +35,16 @@
434@@ -402,6 +402,15 @@ index a627a85..505ce9e 100644
435 private:
436 int CovertCaptureDataToNV12(const uint8_t* sample,
437 size_t sample_size,
438+@@ -62,7 +72,7 @@
439+ bool IsNV12ConvertSupported(uint32_t fourcc);
440+
441+ private:
442+- V4L2CaptureDelegate* v4l2_delegate_;
443++ const raw_ptr<V4L2CaptureDelegate> v4l2_delegate_;
444+ gpu::GpuMemoryBufferSupport gmb_support_;
445+ std::vector<uint8_t> i420_buffer_;
446+ };
447 diff --git a/media/capture/video/linux/v4l2_external_buffer_cache.cc b/media/capture/video/linux/v4l2_external_buffer_cache.cc
448 new file mode 100644
449 index 0000000..34c274c
450diff --git a/build/chromium-patches/optimization/topic-intel/b4e98991:enable-vda-video-encoder-on-wayland.diff b/build/chromium-patches/optimization/topic-intel/8cd198e4:enable-vda-video-encoder-on-wayland.diff
451similarity index 90%
452rename from build/chromium-patches/optimization/topic-intel/b4e98991:enable-vda-video-encoder-on-wayland.diff
453rename to build/chromium-patches/optimization/topic-intel/8cd198e4:enable-vda-video-encoder-on-wayland.diff
454index d4d85f3..538d1ce 100644
455--- a/build/chromium-patches/optimization/topic-intel/b4e98991:enable-vda-video-encoder-on-wayland.diff
456+++ b/build/chromium-patches/optimization/topic-intel/8cd198e4:enable-vda-video-encoder-on-wayland.diff
457@@ -1,10 +1,10 @@
458-From b4e989917b60717230f92546eeff5c090df9dc2c Mon Sep 17 00:00:00 2001
459+From 8cd198e4e280faeda02b2cafe9eb876f007d4060 Mon Sep 17 00:00:00 2001
460 From: Yaowei Zhou <yaowei.zhou@intel.com>
461-Date: Mon, 03 Apr 2023 15:37:02 +0800
462+Date: Thu, 20 Apr 2023 14:29:16 +0800
463 Subject: [PATCH] Enable the VDAVideoDecoder on the wayland
464
465 Bug: N/A
466-Change-Id: If4044b552e3d802ea48690365e1a1d63d35b1f51
467+Change-Id: I3f2629e274cbe26034964e39b4679fe083945131
468 ---
469
470 diff --git a/media/gpu/vaapi/vaapi_picture_factory.cc b/media/gpu/vaapi/vaapi_picture_factory.cc
471diff --git a/build/chromium-patches/optimization/topic-intel/5df4976:dynamic-check-nv12.diff b/build/chromium-patches/optimization/topic-intel/faf232f:dynamic-check-nv12.diff
472similarity index 89%
473rename from build/chromium-patches/optimization/topic-intel/5df4976:dynamic-check-nv12.diff
474rename to build/chromium-patches/optimization/topic-intel/faf232f:dynamic-check-nv12.diff
475index 9e5cd7f..109ad56 100644
476--- a/build/chromium-patches/optimization/topic-intel/5df4976:dynamic-check-nv12.diff
477+++ b/build/chromium-patches/optimization/topic-intel/faf232f:dynamic-check-nv12.diff
478@@ -1,17 +1,17 @@
479-From 5df4976fd3be9e20d6bad09d23e197ca393b573b Mon Sep 17 00:00:00 2001
480+From faf232fb0b19219e5f112f26d50714f6c575b93f Mon Sep 17 00:00:00 2001
481 From: Yaowei Zhou <yaowei.zhou@intel.com>
482-Date: Thu, 02 Feb 2023 14:22:34 +0800
483-Subject: [PATCH] Dynamic fallback to system memory when failed to allocate NV12 GPU memory buffer
484+Date: Wed, 19 Apr 2023 16:52:32 +0800
485+Subject: [PATCH] Dynamic fallback to system memory when failed to allocate NV12 buffer
486
487 Bug: N/A
488-Change-Id: I8ba75b3981ebb890662d2a3b3981c0578d0f6ec7
489+Change-Id: I88b553ff4bdc1ea59aaa3cc47948ca6648c87d0c
490 ---
491
492 diff --git a/content/browser/gpu/gpu_memory_buffer_manager_singleton.cc b/content/browser/gpu/gpu_memory_buffer_manager_singleton.cc
493-index 668fcf8..5aa1fa7c 100644
494+index b3e46e9..e175b29 100644
495 --- a/content/browser/gpu/gpu_memory_buffer_manager_singleton.cc
496 +++ b/content/browser/gpu/gpu_memory_buffer_manager_singleton.cc
497-@@ -21,6 +21,10 @@
498+@@ -22,6 +22,10 @@
499 #include "ui/accelerated_widget_mac/window_resize_helper_mac.h"
500 #endif
501
502@@ -22,11 +22,12 @@ index 668fcf8..5aa1fa7c 100644
503 namespace content {
504 namespace {
505
506-@@ -52,6 +56,23 @@
507- #endif
508+@@ -76,8 +80,23 @@
509+
510+ return supported;
511 }
512+-#endif // BUILDFLAG(IS_LINUX)
513
514-+#if BUILDFLAG(IS_LINUX)
515 +// Dynamic check NV12 format support as supported format inconsistent in
516 +// system and chromium miniGBM
517 +void DynamicUpdateVideoCaptureUseGpuMemoryBuffer(bool support_nv12) {
518@@ -46,7 +47,7 @@ index 668fcf8..5aa1fa7c 100644
519 } // namespace
520
521 GpuMemoryBufferManagerSingleton::GpuMemoryBufferManagerSingleton(int client_id)
522-@@ -79,6 +100,12 @@
523+@@ -105,6 +124,12 @@
524 }
525
526 void GpuMemoryBufferManagerSingleton::OnGpuExtraInfoUpdate() {
527@@ -58,7 +59,7 @@ index 668fcf8..5aa1fa7c 100644
528 +
529 #if defined(USE_OZONE_PLATFORM_X11)
530 // X11 fetches buffer formats on gpu and passes them via gpu extra info.
531- if (!ShouldSetBufferFormatsFromGpuExtraInfo())
532+ if (ShouldSetBufferFormatsFromGpuExtraInfo()) {
533 diff --git a/ui/gfx/gpu_extra_info.h b/ui/gfx/gpu_extra_info.h
534 index e8fa594..d1edbfea 100644
535 --- a/ui/gfx/gpu_extra_info.h
536@@ -75,10 +76,10 @@ index e8fa594..d1edbfea 100644
537
538 } // namespace gfx
539 diff --git a/ui/gfx/mojom/BUILD.gn b/ui/gfx/mojom/BUILD.gn
540-index 055d205..0fec929 100644
541+index b511389..07063be 100644
542 --- a/ui/gfx/mojom/BUILD.gn
543 +++ b/ui/gfx/mojom/BUILD.gn
544-@@ -49,7 +49,9 @@
545+@@ -51,7 +51,9 @@
546 if (ozone_platform_x11) {
547 enabled_features += [ "enable_x11_params" ]
548 }
549@@ -171,7 +172,7 @@ index b3e92d8..dc982f3 100644
550 bool WaylandGLEGLUtility::X11DoesVisualHaveAlphaForTest() const {
551 return false;
552 diff --git a/ui/ozone/platform/x11/gl_egl_utility_x11.cc b/ui/ozone/platform/x11/gl_egl_utility_x11.cc
553-index 58c7fe6..0eb5608 100644
554+index 58c7fe6..06b8ad7 100644
555 --- a/ui/ozone/platform/x11/gl_egl_utility_x11.cc
556 +++ b/ui/ozone/platform/x11/gl_egl_utility_x11.cc
557 @@ -12,6 +12,10 @@
558@@ -191,7 +192,7 @@ index 58c7fe6..0eb5608 100644
559 }
560 +#if BUILDFLAG(IS_LINUX)
561 + gpu_extra_info.gpu_memory_buffer_support_NV12 = base::ranges::any_of(
562-+ ui::GpuMemoryBufferSupportX11::GetInstance()->supported_configs(),
563++ gpu_extra_info.gpu_memory_buffer_support_x11,
564 + [](gfx::BufferUsageAndFormat other) {
565 + return other.format == gfx::BufferFormat::YUV_420_BIPLANAR &&
566 + other.usage == gfx::BufferUsage::GPU_READ_CPU_READ_WRITE;
567diff --git a/build/chromium-patches/series b/build/chromium-patches/series
568index e9bf227..4cb01b8 100644
569--- a/build/chromium-patches/series
570+++ b/build/chromium-patches/series
571@@ -1,11 +1,11 @@
572 optimization/internal:include-libva-config.patch
573 optimization/internal:fix-dri-loading.diff
574-optimization/topic-intel/5df4976:dynamic-check-nv12.diff
575-optimization/topic-intel/a45401f:vaapi-flag-ozone-wayland.diff
576-optimization/topic-intel/ad27bcd:one-copy.diff
577-optimization/topic-intel/bb6aa463:linux-unstable-deb.diff
578-optimization/topic-intel/8c5c7f51:zero-copy.diff
579-optimization/topic-intel/b4e98991:enable-vda-video-encoder-on-wayland.diff
580+optimization/topic-intel/faf232f:dynamic-check-nv12.diff
581+optimization/topic-intel/4ed5da1:vaapi-flag-ozone-wayland.diff
582+optimization/topic-intel/1937d60:one-copy.diff
583+optimization/topic-intel/22fe045d:linux-unstable-deb.diff
584+optimization/topic-intel/7be5b21:zero-copy.diff
585+optimization/topic-intel/8cd198e4:enable-vda-video-encoder-on-wayland.diff
586 title-bar-default-system.patch-v35
587 search-credit.patch
588 snap-policies-path.patch
589diff --git a/launcher/chromium.launcher b/launcher/chromium.launcher
590index 2a47614..ef4cd2a 100755
591--- a/launcher/chromium.launcher
592+++ b/launcher/chromium.launcher
593@@ -140,14 +140,11 @@ if [ $WANT_HEADLESS -eq 0 ] ; then
594 fi
595
596 # Add necessary flags for VAAPI video en/decoding
597-CHROMIUM_VAAPI_FLAGS='--enable-features=VaapiVideoDecoder,VaapiVideoEncoder,VaapiVideoDecodeLinuxGL,UseChromeOSDirectVideoDecoder'
598+CHROMIUM_VAAPI_FLAGS='--use-gl=angle --use-angle=gl --enable-features=VaapiVideoDecoder,VaapiVideoEncoder,VaapiVideoDecodeLinuxGL,UseChromeOSDirectVideoDecoder'
599 CHROMIUM_ONECOPY_FLAGS="--video-capture-use-gpu-memory-buffer"
600-if [ -n "$WAYLAND_DISPLAY" ]; then
601- CHROMIUM_FLAGS="--ozone-platform=wayland $CHROMIUM_FLAGS"
602-fi
603-CHROMIUM_MPO_FLAGS="--enable-hardware-overlays=\"\""
604+CHROMIUM_OZONE_FLAGS="--ozone-platform-hint=auto"
605
606-CHROMIUM_FLAGS="$CHROMIUM_VAAPI_FLAGS $CHROMIUM_ONECOPY_FLAGS $CHROMIUM_MPO_FLAGS $CHROMIUM_FLAGS"
607+CHROMIUM_FLAGS="$CHROMIUM_OZONE_FLAGS $CHROMIUM_VAAPI_FLAGS $CHROMIUM_ONECOPY_FLAGS $CHROMIUM_FLAGS"
608
609 # GlobalVaapiLock : webRTC optimization
610 CHROMIUM_FLAGS="--disable-features=TFLiteLanguageDetectionEnabled,GlobalVaapiLock $CHROMIUM_FLAGS"

Subscribers

People subscribed via source and target branches

to status/vote changes: