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
This commit is contained in:
Sushil Chauhan
2018-01-19 10:58:13 -08:00
committed by Gerrit - the friendly Code Review server
parent 345ae29957
commit c19813c3fc

View File

@@ -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;