hwc2: invalidate on format change

Bug: 62999638
Change-Id: I7a59c9f5a104637a7e61af04682f1239b09d4dcf
(cherry picked from commit dd6edac0dc)
This commit is contained in:
Naseer Ahmed 2017-06-27 22:17:07 -04:00 committed by android-build-team Robot
parent 2d57034528
commit 9bf1d36aa7
1 changed files with 4 additions and 0 deletions

View File

@ -84,7 +84,11 @@ HWC2::Error HWCLayer::SetLayerBuffer(buffer_handle_t buffer, int32_t acquire_fen
layer_buffer->width = UINT32(handle->width);
layer_buffer->height = UINT32(handle->height);
auto format = layer_buffer->format;
layer_buffer->format = GetSDMFormat(handle->format, handle->flags);
if (format != layer_buffer->format) {
needs_validate_ = true;
}
if (SetMetaData(handle, layer_) != kErrorNone) {
return HWC2::Error::BadLayer;
}