Merge "sdm: Fallback on scRGB layers"
This commit is contained in:
committed by
Gerrit - the friendly Code Review server
commit
391c797d62
@@ -481,6 +481,8 @@ void HWCDisplay::BuildLayerStack() {
|
|||||||
uint32_t color_mode_count = 0;
|
uint32_t color_mode_count = 0;
|
||||||
display_intf_->GetColorModeCount(&color_mode_count);
|
display_intf_->GetColorModeCount(&color_mode_count);
|
||||||
|
|
||||||
|
bool extended_range = false;
|
||||||
|
|
||||||
// Add one layer for fb target
|
// Add one layer for fb target
|
||||||
// TODO(user): Add blit target layers
|
// TODO(user): Add blit target layers
|
||||||
for (auto hwc_layer : layer_set_) {
|
for (auto hwc_layer : layer_set_) {
|
||||||
@@ -501,6 +503,11 @@ void HWCDisplay::BuildLayerStack() {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto range = hwc_layer->GetLayerDataspace() & HAL_DATASPACE_RANGE_MASK;
|
||||||
|
if (range == HAL_DATASPACE_RANGE_EXTENDED) {
|
||||||
|
extended_range = true;
|
||||||
|
}
|
||||||
|
|
||||||
working_primaries = WidestPrimaries(working_primaries,
|
working_primaries = WidestPrimaries(working_primaries,
|
||||||
layer->input_buffer.color_metadata.colorPrimaries);
|
layer->input_buffer.color_metadata.colorPrimaries);
|
||||||
|
|
||||||
@@ -628,7 +635,7 @@ void HWCDisplay::BuildLayerStack() {
|
|||||||
// fall back frame composition to GPU when client target is 10bit
|
// fall back frame composition to GPU when client target is 10bit
|
||||||
// TODO(user): clarify the behaviour from Client(SF) and SDM Extn -
|
// TODO(user): clarify the behaviour from Client(SF) and SDM Extn -
|
||||||
// when handling 10bit FBT, as it would affect blending
|
// 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
|
// Must fall back to client composition
|
||||||
MarkLayersForClientComposition();
|
MarkLayersForClientComposition();
|
||||||
}
|
}
|
||||||
@@ -1844,6 +1851,7 @@ void HWCDisplay::MarkLayersForClientComposition() {
|
|||||||
Layer *layer = hwc_layer->GetSDMLayer();
|
Layer *layer = hwc_layer->GetSDMLayer();
|
||||||
layer->flags.skip = true;
|
layer->flags.skip = true;
|
||||||
}
|
}
|
||||||
|
layer_stack_.flags.skip_present = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void HWCDisplay::ApplyScanAdjustment(hwc_rect_t *display_frame) {
|
void HWCDisplay::ApplyScanAdjustment(hwc_rect_t *display_frame) {
|
||||||
|
|||||||
@@ -667,6 +667,9 @@ LayerBufferFormat HWCLayer::GetSDMFormat(const int32_t &source, const int flags)
|
|||||||
case HAL_PIXEL_FORMAT_YCbCr_420_P010_VENUS:
|
case HAL_PIXEL_FORMAT_YCbCr_420_P010_VENUS:
|
||||||
format = kFormatYCbCr420P010Venus;
|
format = kFormatYCbCr420P010Venus;
|
||||||
break;
|
break;
|
||||||
|
case HAL_PIXEL_FORMAT_RGBA_FP16:
|
||||||
|
format = kFormatInvalid;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
DLOGW("Unsupported format type = %d", source);
|
DLOGW("Unsupported format type = %d", source);
|
||||||
return kFormatInvalid;
|
return kFormatInvalid;
|
||||||
|
|||||||
Reference in New Issue
Block a user