diff options
author | Sushil Chauhan <sushilchauhan@codeaurora.org> | 2018-01-19 10:58:13 -0800 |
---|---|---|
committer | Sushil Chauhan <sushilchauhan@codeaurora.org> | 2018-01-19 15:02:08 -0800 |
commit | 0935c7595fc0057787bff64ebd7b0df2e5e415c0 (patch) | |
tree | 776f202bc1342b2cb286e39ed69b03f88d5857e8 /sdm/libs/hwc2/hwc_layers.cpp | |
parent | 07254304fa7f457e1ba76105676e0a25027aa4be (diff) |
hwc2: Update layer frame rate from metadata only if it is valid
To compare for Skip Validate feature, update the layer frame rate
from the buffer metadata, only if it is valid.
CRs-Fixed: 2175653
Change-Id: Ia3f6a8e928ded91c26729062e7ed20a687744ad1
Diffstat (limited to 'sdm/libs/hwc2/hwc_layers.cpp')
-rw-r--r-- | sdm/libs/hwc2/hwc_layers.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sdm/libs/hwc2/hwc_layers.cpp b/sdm/libs/hwc2/hwc_layers.cpp index 0bcffc62..b42eda74 100644 --- a/sdm/libs/hwc2/hwc_layers.cpp +++ b/sdm/libs/hwc2/hwc_layers.cpp @@ -728,7 +728,7 @@ DisplayError HWCLayer::SetMetaData(const private_handle_t *pvt_handle, Layer *la float fps = 0; uint32_t frame_rate = layer->frame_rate; if (getMetaData(handle, GET_REFRESH_RATE, &fps) == 0) { - frame_rate = RoundToStandardFPS(fps); + frame_rate = (fps != 0) ? RoundToStandardFPS(fps) : layer->frame_rate; } int32_t interlaced = 0; |