Merge "hwc: Dump in SDM only if layer stack is valid"

This commit is contained in:
Linux Build Service Account
2018-01-31 00:53:16 -08:00
committed by Gerrit - the friendly Code Review server
2 changed files with 12 additions and 0 deletions

View File

@@ -434,6 +434,8 @@ HWC2::Error HWCDisplay::CreateLayer(hwc2_layer_t *out_layer_id) {
*out_layer_id = layer->GetId();
geometry_changes_ |= GeometryChanges::kAdded;
validated_ = false;
layer_stack_invalid_ = true;
return HWC2::Error::None;
}
@@ -466,6 +468,8 @@ HWC2::Error HWCDisplay::DestroyLayer(hwc2_layer_t layer_id) {
geometry_changes_ |= GeometryChanges::kRemoved;
validated_ = false;
layer_stack_invalid_ = true;
return HWC2::Error::None;
}
@@ -633,6 +637,8 @@ void HWCDisplay::BuildLayerStack() {
}
// set secure display
SetSecureDisplay(secure_display_active);
layer_stack_invalid_ = false;
}
void HWCDisplay::BuildSolidFillStack() {
@@ -2040,6 +2046,11 @@ std::string HWCDisplay::Dump() {
<< std::endl;
}
if (layer_stack_invalid_) {
os << "\n Layers added or removed but not reflected to SDM's layer stack yet\n";
return os.str();
}
if (color_mode_) {
os << "\n----------Color Modes---------\n";
color_mode_->Dump(&os);

View File

@@ -257,6 +257,7 @@ class HWCDisplay : public DisplayEventHandler {
};
bool validated_ = false;
bool layer_stack_invalid_ = true;
CoreInterface *core_intf_ = nullptr;
HWCCallbacks *callbacks_ = nullptr;
HWCBufferAllocator *buffer_allocator_ = NULL;