drm_hwcomposer: Extract ConvertBoInfo() from ImportBuffer() method
To check either BO could be imported on validation stage, we need to
get more information regarding buffer (format, size, etc.)
This extraction also allows us to make ImportBuffer() and CanImport()
methods generic for all platforms.
In case BO can't be imported due to already existant checks in ImportBuffer(),
validator only marks single layer to be elaborated by GPU instead of whole
composition.
Signed-off-by: Roman Stratiienko <roman.stratiienko@globallogic.com>
diff --git a/include/platform.h b/include/platform.h
index 6fdece2..6775e29 100644
--- a/include/platform.h
+++ b/include/platform.h
@@ -52,6 +52,9 @@
// Checks if importer can import the buffer.
virtual bool CanImportBuffer(buffer_handle_t handle) = 0;
+
+ // Convert platform-dependent buffer format to drm_hwc internal format.
+ virtual int ConvertBoInfo(buffer_handle_t handle, hwc_drm_bo_t *bo) = 0;
};
class Planner {