hwc2: Skip validation fixes

* Disable skip validation for solid fill during calibration.
* Require validation when the client changes the composition type

Bug: 77925367
CRs-Fixed: 2122072
Change-Id: I9ded200e5c15701f653c73d67c18c41de8278d52
This commit is contained in:
Naseer Ahmed 2017-10-05 18:47:15 -04:00 committed by Marissa Wall
parent 530894e77a
commit 1ff191fed3
4 changed files with 16 additions and 0 deletions

View File

@ -1673,6 +1673,10 @@ std::string HWCDisplay::Dump() {
}
bool HWCDisplay::CanSkipValidate() {
if (solid_fill_enable_) {
return false;
}
for (auto hwc_layer : layer_set_) {
if (hwc_layer->NeedsValidation()) {
return false;

View File

@ -165,6 +165,10 @@ HWC2::Error HWCLayer::SetLayerColor(hwc_color_t color) {
}
HWC2::Error HWCLayer::SetLayerCompositionType(HWC2::Composition type) {
// Validation is required when the client changes the composition type
if (client_requested_ != type) {
needs_validate_ = true;
}
client_requested_ = type;
switch (type) {
case HWC2::Composition::Client:

View File

@ -1883,6 +1883,10 @@ std::string HWCDisplay::Dump() {
}
bool HWCDisplay::CanSkipValidate() {
if (solid_fill_enable_) {
return false;
}
// Layer Stack checks
if (layer_stack_.flags.hdr_present && (tone_mapper_ && tone_mapper_->IsActive())) {
return false;

View File

@ -329,6 +329,10 @@ HWC2::Error HWCLayer::SetLayerColor(hwc_color_t color) {
}
HWC2::Error HWCLayer::SetLayerCompositionType(HWC2::Composition type) {
// Validation is required when the client changes the composition type
if (client_requested_ != type) {
needs_validate_ = true;
}
client_requested_ = type;
switch (type) {
case HWC2::Composition::Client: