diff options
Diffstat (limited to 'native/android/surface_control.cpp')
-rw-r--r-- | native/android/surface_control.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/native/android/surface_control.cpp b/native/android/surface_control.cpp index 195fd5e60295..80cf663978a9 100644 --- a/native/android/surface_control.cpp +++ b/native/android/surface_control.cpp @@ -634,24 +634,25 @@ void ASurfaceTransaction_setColor(ASurfaceTransaction* aSurfaceTransaction, color.g = g; color.b = b; - transaction->setBackgroundColor(surfaceControl, color, alpha, static_cast<ui::Dataspace>(dataspace)); + transaction->setBackgroundColor(surfaceControl, color, alpha, + static_cast<ui::Dataspace>(dataspace)); } void ASurfaceTransaction_setFrameRate(ASurfaceTransaction* aSurfaceTransaction, ASurfaceControl* aSurfaceControl, float frameRate, int8_t compatibility) { - ASurfaceTransaction_setFrameRateWithSeamlessness(aSurfaceTransaction, aSurfaceControl, - frameRate, compatibility, - /*shouldBeSeamless*/ true); + ASurfaceTransaction_setFrameRateWithChangeStrategy( + aSurfaceTransaction, aSurfaceControl, frameRate, compatibility, + ANATIVEWINDOW_CHANGE_FRAME_RATE_ONLY_IF_SEAMLESS); } -void ASurfaceTransaction_setFrameRateWithSeamlessness(ASurfaceTransaction* aSurfaceTransaction, - ASurfaceControl* aSurfaceControl, - float frameRate, int8_t compatibility, - bool shouldBeSeamless) { +void ASurfaceTransaction_setFrameRateWithChangeStrategy(ASurfaceTransaction* aSurfaceTransaction, + ASurfaceControl* aSurfaceControl, + float frameRate, int8_t compatibility, + int8_t changeFrameRateStrategy) { CHECK_NOT_NULL(aSurfaceTransaction); CHECK_NOT_NULL(aSurfaceControl); Transaction* transaction = ASurfaceTransaction_to_Transaction(aSurfaceTransaction); sp<SurfaceControl> surfaceControl = ASurfaceControl_to_SurfaceControl(aSurfaceControl); - transaction->setFrameRate(surfaceControl, frameRate, compatibility, shouldBeSeamless); + transaction->setFrameRate(surfaceControl, frameRate, compatibility, changeFrameRateStrategy); } |