graphics: add ComposerResources
Add ComposerResources to the HAL support library to replace
HandleImporter, DisplayData, and BufferCache in ComposerClient.
ComposerResources tracks the current displays and layers, as well as
managing buffer caches for them.
This is more than refactoring. HandleImporter used to be a static
object, but we want ComposerResources to be self-contained rather
than depending on a static object. This needs to be fixed. It also
becomes obvious that we used to treat sideband streams as buffers in
BufferCacheEntry destructor incorrectly. That needs to be fixed as
well (as a trivial consequence of making HandleImporter non-static).
Test: boots and VTS
Change-Id: I8e3014cb233e2a6d1a71cc244eff80f126c58a94
diff --git a/graphics/composer/2.1/utils/hal/Android.bp b/graphics/composer/2.1/utils/hal/Android.bp
index 35ddc0a..a8ff59d 100644
--- a/graphics/composer/2.1/utils/hal/Android.bp
+++ b/graphics/composer/2.1/utils/hal/Android.bp
@@ -19,10 +19,12 @@
vendor_available: true,
shared_libs: [
"android.hardware.graphics.composer@2.1",
+ "android.hardware.graphics.mapper@2.0",
"libhardware", // TODO remove hwcomposer2.h dependency
],
export_shared_lib_headers: [
"android.hardware.graphics.composer@2.1",
+ "android.hardware.graphics.mapper@2.0",
"libhardware",
],
export_include_dirs: ["include"],