Snap for 4574286 from ef09bce3c4 to pi-release

Change-Id: I84880917b615ba57bc4e1a5509ec48ca687d1bc5
This commit is contained in:
android-build-team Robot 2018-01-30 08:24:16 +00:00
commit eb70eda630
2 changed files with 12 additions and 1 deletions

View File

@ -452,6 +452,8 @@ void HWCDisplay::BuildLayerStack() {
metadata_refresh_rate_ = 0;
auto working_primaries = ColorPrimaries_BT709_5;
bool extended_range = false;
// Add one layer for fb target
// TODO(user): Add blit target layers
for (auto hwc_layer : layer_set_) {
@ -469,6 +471,11 @@ void HWCDisplay::BuildLayerStack() {
#endif
}
auto range = hwc_layer->GetLayerDataspace() & HAL_DATASPACE_RANGE_MASK;
if(range == HAL_DATASPACE_RANGE_EXTENDED) {
extended_range = true;
}
working_primaries = WidestPrimaries(working_primaries,
layer->input_buffer.color_metadata.colorPrimaries);
@ -573,7 +580,7 @@ void HWCDisplay::BuildLayerStack() {
// fall back frame composition to GPU when client target is 10bit
// TODO(user): clarify the behaviour from Client(SF) and SDM Extn -
// when handling 10bit FBT, as it would affect blending
if (Is10BitFormat(sdm_client_target->input_buffer.format)) {
if (Is10BitFormat(sdm_client_target->input_buffer.format) || extended_range) {
// Must fall back to client composition
MarkLayersForClientComposition();
}
@ -1642,6 +1649,7 @@ void HWCDisplay::MarkLayersForClientComposition() {
Layer *layer = hwc_layer->GetSDMLayer();
layer->flags.skip = true;
}
layer_stack_.flags.skip_present = true;
}
void HWCDisplay::ApplyScanAdjustment(hwc_rect_t *display_frame) {

View File

@ -611,6 +611,9 @@ LayerBufferFormat HWCLayer::GetSDMFormat(const int32_t &source, const int flags)
case HAL_PIXEL_FORMAT_YCbCr_420_TP10_UBWC:
format = kFormatYCbCr420TP10Ubwc;
break;
case HAL_PIXEL_FORMAT_RGBA_FP16:
format = kFormatInvalid;
break;
default:
DLOGW("Unsupported format type = %d", source);
return kFormatInvalid;