Document HWC2to1Adapter
Change-Id: I1ba60143b74e886f132136c7ecc13fd89c349dd4
diff --git a/services/surfaceflinger/DisplayHardware/HWC2.h b/services/surfaceflinger/DisplayHardware/HWC2.h
index 1c709b2..42b79bb 100644
--- a/services/surfaceflinger/DisplayHardware/HWC2.h
+++ b/services/surfaceflinger/DisplayHardware/HWC2.h
@@ -57,6 +57,8 @@
typedef std::function<void(std::shared_ptr<Display>)> RefreshCallback;
typedef std::function<void(std::shared_ptr<Display>, nsecs_t)> VsyncCallback;
+// C++ Wrapper around hwc2_device_t. Load all functions pointers
+// and handle callback registration.
class Device
{
public:
@@ -207,6 +209,7 @@
std::vector<std::pair<std::shared_ptr<Display>, nsecs_t>> mPendingVsyncs;
};
+// Convenience C++ class to access hwc2_device_t Display functions directly.
class Display : public std::enable_shared_from_this<Display>
{
public:
@@ -368,6 +371,7 @@
std::unordered_map<hwc2_config_t, std::shared_ptr<const Config>> mConfigs;
};
+// Convenience C++ class to access hwc2_device_t Layer functions directly.
class Layer
{
public: