1package {
2    // See: http://go/android-license-faq
3    // A large-scale-change added 'default_applicable_licenses' to import
4    // all of the 'license_kinds' from "frameworks_native_license"
5    // to get the below license kinds:
6    //   SPDX-license-identifier-Apache-2.0
7    default_applicable_licenses: ["frameworks_native_license"],
8    default_team: "trendy_team_android_core_graphics_stack",
9}
10
11cc_defaults {
12    name: "libscheduler_defaults",
13    defaults: ["surfaceflinger_defaults"],
14    cflags: [
15        "-DLOG_TAG=\"Scheduler\"",
16        "-DATRACE_TAG=ATRACE_TAG_GRAPHICS",
17    ],
18    shared_libs: [
19        "libbase",
20        "libcutils",
21        "liblog",
22        "libui",
23        "libutils",
24    ],
25    static_libs: ["libsurfaceflinger_common"],
26}
27
28cc_library_headers {
29    name: "libscheduler_headers",
30    defaults: ["libscheduler_defaults"],
31    export_include_dirs: ["include"],
32}
33
34// TODO(b/185535769): Remove libsurfaceflinger_unittest's dependency on AsyncCallRecorder.
35cc_library_headers {
36    name: "libscheduler_test_headers",
37    defaults: ["libscheduler_defaults"],
38    export_include_dirs: ["tests"],
39}
40
41cc_library_static {
42    name: "libscheduler",
43    defaults: ["libscheduler_defaults"],
44    srcs: [
45        "src/FrameTargeter.cpp",
46        "src/PresentLatencyTracker.cpp",
47        "src/Timer.cpp",
48    ],
49    local_include_dirs: ["include"],
50    export_include_dirs: ["include"],
51}
52
53cc_test {
54    name: "libscheduler_test",
55    test_suites: ["device-tests"],
56    defaults: [
57        "libscheduler_defaults",
58        "libsurfaceflinger_common_test_deps",
59    ],
60    srcs: [
61        "tests/FrameTargeterTest.cpp",
62        "tests/PresentLatencyTrackerTest.cpp",
63        "tests/TimerTest.cpp",
64    ],
65    static_libs: [
66        "libgmock",
67        "libgtest",
68        "libscheduler",
69    ],
70}
71