summaryrefslogtreecommitdiff
path: root/chromium/ui/ozone/ozone.gni
blob: 8d12805c2056a4d6da5b7d6fd7a52f2ddb0dbe10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build/config/chromecast_build.gni")

declare_args() {
  # Select platforms automatically. Turn this off for manual control.
  ozone_auto_platforms = true

  # This enables memory-mapped access to accelerated graphics buffers via the
  # VGEM ("virtual GEM") driver. This is currently only available on Chrome OS
  # kernels and affects code in the GBM ozone platform.
  # TODO(dshwang): remove this flag when all gbm hardware supports vgem map.
  # crbug.com/519587
  use_vgem_map = false
}

declare_args() {
  # The platform that will be active by default.
  ozone_platform = ""

  # Enable individual platforms.
  ozone_platform_caca = false
  ozone_platform_cast = false
  ozone_platform_egltest = false
  ozone_platform_gbm = false
  ozone_platform_ozonex = false
  ozone_platform_headless = false
  ozone_platform_x11 = false

  if (ozone_auto_platforms) {
    # Use headless as the default platform.
    ozone_platform = "headless"
    ozone_platform_headless = true

    if (is_chromecast) {
      if (!disable_display) {
        # Enable the Cast ozone platform on all A/V Cast builds.
        ozone_platform_cast = true

        # For desktop Chromecast builds, override the default "headless"
        # platform with --ozone-platform=egltest
        # TODO(halliwell): Create a libcast_graphics implementation for desktop
        # using X11, and disable these two platforms. "cast" platform should be
        # the default on every A/V build.
        if (is_cast_desktop_build) {
          ozone_platform_egltest = true
          ozone_platform_ozonex = true
        } else {
          # On device builds, enable "cast" as the default platform.
          ozone_platform = "cast"
        }
      }
    } else if (is_chromeos) {
      ozone_platform_gbm = true
      ozone_platform_egltest = true
    } else {
      # Build all platforms whose deps are in install-build-deps.sh.
      # Only these platforms will be compile tested by buildbots.
      ozone_platform_egltest = true
    }
  }
}