[M120 Migration][VD] Enable direct rendering for TVPlus
[platform/framework/web/chromium-efl.git] / components / metrics / generate_histograms_variants_allowlist.gni
1 # Copyright 2023 The Chromium Authors
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 # Generates an output file that contains all histograms which share the same
6 # variant name. This output file will act as an allow list.
7 #
8 # Parameters:
9 #   input_xml_file: Input file that contains the allow list. This should be a
10 #     .xml file with histogram descriptions and should be a path starting with
11 #     //tools/metrics/histograms/
12 #
13 #   namespace:
14 #     Namespace in which the generated code should be scoped.
15 #
16 #   header_filename:
17 #     Name of the generated header file.
18 #
19 #   source_filename:
20 #     Name of the generated source file.
21 #
22 #   allow_list_name:
23 #     Name of the variants list that act as an allow list.
24 #
25 template("generate_histograms_variants_allowlist") {
26   action(target_name) {
27     header_filename = "$target_gen_dir/" + invoker.header_filename
28     source_filename = "$target_gen_dir/" + invoker.source_filename
29
30     script =
31         "//tools/metrics/histograms/generate_histograms_variants_allowlist.py"
32     outputs = [
33       header_filename,
34       source_filename,
35     ]
36
37     args = [
38       "-a" + invoker.allow_list_name,
39       "-n" + invoker.namespace,
40       "-o" + rebase_path(root_gen_dir, root_build_dir),
41       "-H" + rebase_path(header_filename, root_gen_dir),
42       "-s" + rebase_path(source_filename, root_gen_dir),
43       "-f" + rebase_path(invoker.input_xml_file, root_build_dir),
44     ]
45   }
46 }