Android.bp 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. cc_defaults {
  2. name: "libcompositionengine_defaults",
  3. defaults: ["surfaceflinger_defaults"],
  4. cflags: [
  5. "-DLOG_TAG=\"CompositionEngine\"",
  6. ],
  7. shared_libs: [
  8. "[email protected]",
  9. "[email protected]",
  10. "[email protected]",
  11. "[email protected]",
  12. "[email protected]",
  13. "[email protected]",
  14. "[email protected]",
  15. "libbase",
  16. "libcutils",
  17. "libgui",
  18. "liblayers_proto",
  19. "liblog",
  20. "libnativewindow",
  21. "libsync",
  22. "libtimestats_proto",
  23. "libui",
  24. "libutils",
  25. ],
  26. static_libs: [
  27. "libmath",
  28. "librenderengine",
  29. "libtrace_proto",
  30. ],
  31. header_libs: [
  32. "[email protected]",
  33. "[email protected]",
  34. "[email protected]",
  35. "libsurfaceflinger_headers",
  36. ],
  37. }
  38. cc_library {
  39. name: "libcompositionengine",
  40. defaults: ["libcompositionengine_defaults"],
  41. srcs: [
  42. "src/CompositionEngine.cpp",
  43. "src/Display.cpp",
  44. "src/DisplayColorProfile.cpp",
  45. "src/DisplaySurface.cpp",
  46. "src/DumpHelpers.cpp",
  47. "src/HwcBufferCache.cpp",
  48. "src/Layer.cpp",
  49. "src/LayerCompositionState.cpp",
  50. "src/Output.cpp",
  51. "src/OutputCompositionState.cpp",
  52. "src/OutputLayer.cpp",
  53. "src/OutputLayerCompositionState.cpp",
  54. "src/RenderSurface.cpp",
  55. ],
  56. local_include_dirs: ["include"],
  57. export_include_dirs: ["include"],
  58. }
  59. cc_library {
  60. name: "libcompositionengine_mocks",
  61. defaults: ["libcompositionengine_defaults"],
  62. srcs: [
  63. "mock/CompositionEngine.cpp",
  64. "mock/Display.cpp",
  65. "mock/DisplayColorProfile.cpp",
  66. "mock/DisplaySurface.cpp",
  67. "mock/Layer.cpp",
  68. "mock/LayerFE.cpp",
  69. "mock/NativeWindow.cpp",
  70. "mock/Output.cpp",
  71. "mock/OutputLayer.cpp",
  72. "mock/RenderSurface.cpp",
  73. ],
  74. static_libs: [
  75. "libgtest",
  76. "libgmock",
  77. "libcompositionengine",
  78. ],
  79. local_include_dirs: ["include"],
  80. export_include_dirs: ["include"],
  81. }
  82. cc_test {
  83. name: "libcompositionengine_test",
  84. test_suites: ["device-tests"],
  85. defaults: ["libcompositionengine_defaults"],
  86. srcs: [
  87. "tests/CompositionEngineTest.cpp",
  88. "tests/DisplayColorProfileTest.cpp",
  89. "tests/DisplayTest.cpp",
  90. "tests/HwcBufferCacheTest.cpp",
  91. "tests/LayerTest.cpp",
  92. "tests/MockHWC2.cpp",
  93. "tests/MockHWComposer.cpp",
  94. "tests/OutputTest.cpp",
  95. "tests/OutputLayerTest.cpp",
  96. "tests/RenderSurfaceTest.cpp",
  97. ],
  98. static_libs: [
  99. "libcompositionengine",
  100. "libcompositionengine_mocks",
  101. "librenderengine_mocks",
  102. "libgmock",
  103. "libgtest",
  104. ],
  105. sanitize: {
  106. // By using the address sanitizer, we not only uncover any issues
  107. // with the test, but also any issues with the code under test.
  108. //
  109. // Note: If you get an runtime link error like:
  110. //
  111. // CANNOT LINK EXECUTABLE "/data/local/tmp/libcompositionengine_test": library "libclang_rt.asan-aarch64-android.so" not found
  112. //
  113. // it is because the address sanitizer shared objects are not installed
  114. // by default in the system image.
  115. //
  116. // You can either "make dist tests" before flashing, or set this
  117. // option to false temporarily.
  118. address: true,
  119. },
  120. }