Move ADPF to standalone lib
Refactor the PowerAdvisor into its own independent library to better
reflect ownership and team structure, as well as making it easier to
expand and test, as the previous placement under "DisplayHardware"
was confusing.
Test: libpoweradvisor_test
Test: libsurfaceflinger_unittest
Bug: 369692284
Flag: EXEMPT refactor
Change-Id: I51388d0143b7e78413995d9c3a9bde69ae43eff2
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
index c21df19..d3479b7 100644
--- a/services/surfaceflinger/SurfaceFlinger.h
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -57,6 +57,7 @@
#include <utils/threads.h>
#include <compositionengine/OutputColorSetting.h>
+#include <compositionengine/impl/OutputCompositionState.h>
#include <scheduler/Fps.h>
#include <scheduler/PresentLatencyTracker.h>
#include <scheduler/Time.h>
@@ -70,7 +71,6 @@
#include "Display/PhysicalDisplay.h"
#include "DisplayDevice.h"
#include "DisplayHardware/HWC2.h"
-#include "DisplayHardware/PowerAdvisor.h"
#include "DisplayIdGenerator.h"
#include "Effects/Daltonizer.h"
#include "FrontEnd/DisplayInfo.h"
@@ -81,6 +81,7 @@
#include "FrontEnd/TransactionHandler.h"
#include "LayerVector.h"
#include "MutexUtils.h"
+#include "PowerAdvisor/PowerAdvisor.h"
#include "Scheduler/ISchedulerCallback.h"
#include "Scheduler/RefreshRateSelector.h"
#include "Scheduler/Scheduler.h"
@@ -1360,7 +1361,7 @@
sp<os::IInputFlinger> mInputFlinger;
InputWindowCommands mInputWindowCommands;
- std::unique_ptr<Hwc2::PowerAdvisor> mPowerAdvisor;
+ std::unique_ptr<adpf::PowerAdvisor> mPowerAdvisor;
void enableRefreshRateOverlay(bool enable) REQUIRES(mStateLock, kMainThreadContext);