SurfaceFlinger: use setActiveConfigWithConstraints
Remove setActiveConfig and use setActiveConfigWithConstraints
instead. Use the return parameter of setActiveConfigWithConstraints to know
whether a refresh is required and when.
Fixes: 142753004
Bug: 141329414
Test: observe refresh rate switching thru systrace
Change-Id: Ie67a3be9180e7a367fc9e73425598d53a5fd6578
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
index 900c5f7..b5bc5c5 100644
--- a/services/surfaceflinger/SurfaceFlinger.h
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -175,7 +175,7 @@
public ClientCache::ErasedRecipient,
private IBinder::DeathRecipient,
private HWC2::ComposerCallback,
- private Scheduler::ISchedulerCallback {
+ private ISchedulerCallback {
public:
SurfaceFlingerBE& getBE() { return mBE; }
const SurfaceFlingerBE& getBE() const { return mBE; }
@@ -272,9 +272,6 @@
// force full composition on all displays
void repaintEverything();
- // force full composition on all displays without resetting the scheduler idle timer.
- void repaintEverythingForHWC();
-
surfaceflinger::Factory& getFactory() { return mFactory; }
// The CompositionEngine encapsulates all composition related interfaces and actions.
@@ -496,9 +493,11 @@
const hwc_vsync_period_change_timeline_t& updatedTimeline) override;
/* ------------------------------------------------------------------------
- * Scheduler::ISchedulerCallback
+ * ISchedulerCallback
*/
void changeRefreshRate(const Scheduler::RefreshRate&, Scheduler::ConfigEvent) override;
+ // force full composition on all displays without resetting the scheduler idle timer.
+ void repaintEverythingForHWC() override;
/* ------------------------------------------------------------------------
* Message handling
*/