[cef][wam] Make the recipe work with official chromium release tarballs
[AGL/meta-agl-demo.git] / recipes-wam / cef / files / chromium / 0006-agl-Don-t-use-DRI-for-renesas.patch
1 From e7b779035f0d7ff1ba5bf59ea2f314f364493928 Mon Sep 17 00:00:00 2001
2 From: Roger Zanoni <rzanoni@igalia.com>
3 Date: Thu, 4 May 2023 10:42:06 +0200
4 Subject: [PATCH 06/33] [agl] Don't use DRI for renesas
5
6 This adds the use_dri flag that defauls to true and
7 can be disabled if we are building CEF using ozone + wayland
8
9 Upstream-Status: Inappropriate, specific to the renesas boards supported
10 by AGL.
11 Signed-off-by: Roger Zanoni <rzanoni@igalia.com>
12 ---
13  content/gpu/BUILD.gn       | 4 ++--
14  media/gpu/sandbox/BUILD.gn | 5 +++--
15  media/media_options.gni    | 3 +++
16  3 files changed, 8 insertions(+), 4 deletions(-)
17
18 diff --git a/content/gpu/BUILD.gn b/content/gpu/BUILD.gn
19 index 93559f6092c7a..cef8415be7ab1 100644
20 --- a/content/gpu/BUILD.gn
21 +++ b/content/gpu/BUILD.gn
22 @@ -139,8 +139,8 @@ target(link_target_type, "gpu_sources") {
23    }
24  
25    # Use DRI on desktop Linux builds.
26 -  if (current_cpu != "s390x" && current_cpu != "ppc64" && is_linux &&
27 -      !is_castos) {
28 +  if (use_dri && current_cpu != "s390x" && current_cpu != "ppc64" &&
29 +      is_linux && !is_castos) {
30      configs += [ "//build/config/linux/dri" ]
31    }
32  }
33 diff --git a/media/gpu/sandbox/BUILD.gn b/media/gpu/sandbox/BUILD.gn
34 index cfcb7fa80ef89..6ba37d06b29c8 100644
35 --- a/media/gpu/sandbox/BUILD.gn
36 +++ b/media/gpu/sandbox/BUILD.gn
37 @@ -4,6 +4,7 @@
38  
39  import("//build/config/chromeos/ui_mode.gni")
40  import("//media/gpu/args.gni")
41 +import("//media/media_options.gni")
42  
43  source_set("sandbox") {
44    sources = []
45 @@ -30,8 +31,8 @@ source_set("sandbox") {
46    if (use_v4l2_codec) {
47      deps += [ "//media/gpu/v4l2" ]
48    }
49 -  if (current_cpu != "s390x" && current_cpu != "ppc64" && is_linux &&
50 -      !is_castos) {
51 +  if (use_dri && (current_cpu != "s390x" && current_cpu != "ppc64" && is_linux &&
52 +      !is_castos)) {
53      # For DRI_DRIVER_DIR.
54      configs += [ "//build/config/linux/dri" ]
55    }
56 diff --git a/media/media_options.gni b/media/media_options.gni
57 index 61d5046d0cb0e..4898c9034d448 100644
58 --- a/media/media_options.gni
59 +++ b/media/media_options.gni
60 @@ -117,6 +117,9 @@ declare_args() {
61    # Enable inclusion of VVC/H.266 parser/demuxer, and also enable VVC/H.266 decoding
62    # with hardware acceleration provided by platform. Disabled by default for all builds.
63    enable_platform_vvc = false
64 +
65 +  # used to disable dri on renesas boards
66 +  use_dri = true
67  }
68  
69  # Use another declare_args() to allow dependence on args defined above.
70 -- 
71 2.42.1
72