diff options
author | Steven Thomas <steventhomas@google.com> | 2020-02-19 18:53:04 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2020-02-19 18:53:04 +0000 |
commit | 1b1b9d2a1ddbe2a286fa08983fe2f45aae3d2654 (patch) | |
tree | b731176e7b573533757269d4917750efda5ed356 /native/android/surface_control.cpp | |
parent | 2d88183bded7df73f25cf606739e3179784fdc30 (diff) | |
parent | dd7bf2fea566be919c7807b14833c3d3c1fa8458 (diff) |
Merge "Add compatibility param to setFrameRate() api"
Diffstat (limited to 'native/android/surface_control.cpp')
-rw-r--r-- | native/android/surface_control.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/native/android/surface_control.cpp b/native/android/surface_control.cpp index ba793e83f1fb..0af6cbf3cb40 100644 --- a/native/android/surface_control.cpp +++ b/native/android/surface_control.cpp @@ -547,16 +547,11 @@ void ASurfaceTransaction_setColor(ASurfaceTransaction* aSurfaceTransaction, } void ASurfaceTransaction_setFrameRate(ASurfaceTransaction* aSurfaceTransaction, - ASurfaceControl* aSurfaceControl, float frameRate) { + ASurfaceControl* aSurfaceControl, float frameRate, + int8_t compatibility) { CHECK_NOT_NULL(aSurfaceTransaction); CHECK_NOT_NULL(aSurfaceControl); - - sp<SurfaceControl> surfaceControl = ASurfaceControl_to_SurfaceControl(aSurfaceControl); - if (frameRate < 0) { - ALOGE("Failed to set frame ate - invalid frame rate"); - return; - } - Transaction* transaction = ASurfaceTransaction_to_Transaction(aSurfaceTransaction); - transaction->setFrameRate(surfaceControl, frameRate); + sp<SurfaceControl> surfaceControl = ASurfaceControl_to_SurfaceControl(aSurfaceControl); + transaction->setFrameRate(surfaceControl, frameRate, compatibility); } |