diff options
author | 2023-10-25 21:48:56 +0000 | |
---|---|---|
committer | 2023-11-14 16:39:07 -0800 | |
commit | b4ea9e6741adafda4f4cfbb48011ab4d1628d5d2 (patch) | |
tree | 81cea68f3a50d0d7e67cdce84edacf37ccfd3945 /services/surfaceflinger/SurfaceFlinger.cpp | |
parent | 42dc9e9fecad9c7f0009c70b50cc3b129782678b (diff) |
[sfdo] Add the forceClientComposition command to sfdo.
Sample command "adb shell sfdo forceClientComposition enabled"
Bug: 307806248
Test: Build and Run on device.
Change-Id: I42fe0b6b70ce52cf938c7b0897eeb7e08c16443e
Diffstat (limited to 'services/surfaceflinger/SurfaceFlinger.cpp')
-rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index 62eb17d2e7..46514c5a34 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -6736,8 +6736,7 @@ status_t SurfaceFlinger::onTransact(uint32_t code, const Parcel& data, Parcel* r case 1007: // Unused. return NAME_NOT_FOUND; case 1008: // Toggle forced GPU composition. - mDebugDisableHWC = data.readInt32() != 0; - scheduleRepaint(); + sfdo_forceClientComposition(data.readInt32() != 0); return NO_ERROR; case 1009: // Toggle use of transform hint. mDebugDisableTransformHint = data.readInt32() != 0; @@ -9025,6 +9024,11 @@ void SurfaceFlinger::sfdo_scheduleCommit() { setTransactionFlags(eTransactionNeeded | eDisplayTransactionNeeded | eTraversalNeeded); } +void SurfaceFlinger::sfdo_forceClientComposition(bool enabled) { + mDebugDisableHWC = enabled; + scheduleRepaint(); +} + // gui::ISurfaceComposer binder::Status SurfaceComposerAIDL::bootFinished() { @@ -9743,6 +9747,11 @@ binder::Status SurfaceComposerAIDL::scheduleCommit() { return binder::Status::ok(); } +binder::Status SurfaceComposerAIDL::forceClientComposition(bool enabled) { + mFlinger->sfdo_forceClientComposition(enabled); + return binder::Status::ok(); +} + binder::Status SurfaceComposerAIDL::updateSmallAreaDetection(const std::vector<int32_t>& appIds, const std::vector<float>& thresholds) { status_t status; |