Merge "hwc2: Add support for Secure Display"
This commit is contained in:
committed by
Gerrit - the friendly Code Review server
commit
ddb2218d71
@@ -462,6 +462,7 @@ void HWCDisplay::BuildLayerStack() {
|
||||
display_rect_ = LayerRect();
|
||||
metadata_refresh_rate_ = 0;
|
||||
auto working_primaries = ColorPrimaries_BT709_5;
|
||||
bool secure_display_active = false;
|
||||
|
||||
// Add one layer for fb target
|
||||
// TODO(user): Add blit target layers
|
||||
@@ -520,6 +521,10 @@ void HWCDisplay::BuildLayerStack() {
|
||||
layer_stack_.flags.skip_present = true;
|
||||
}
|
||||
|
||||
if (layer->input_buffer.flags.secure_display) {
|
||||
secure_display_active = true;
|
||||
}
|
||||
|
||||
if (hwc_layer->GetClientRequestedCompositionType() == HWC2::Composition::Cursor) {
|
||||
// Currently we support only one HWCursor & only at top most z-order
|
||||
if ((*layer_set_.rbegin())->GetId() == hwc_layer->GetId()) {
|
||||
@@ -599,6 +604,8 @@ void HWCDisplay::BuildLayerStack() {
|
||||
// Must fall back to client composition
|
||||
MarkLayersForClientComposition();
|
||||
}
|
||||
// set secure display
|
||||
SetSecureDisplay(secure_display_active);
|
||||
}
|
||||
|
||||
void HWCDisplay::BuildSolidFillStack() {
|
||||
@@ -1844,7 +1851,12 @@ int HWCDisplay::GetVisibleDisplayRect(hwc_rect_t *visible_rect) {
|
||||
}
|
||||
|
||||
void HWCDisplay::SetSecureDisplay(bool secure_display_active) {
|
||||
secure_display_active_ = secure_display_active;
|
||||
if (secure_display_active_ != secure_display_active) {
|
||||
DLOGI("SecureDisplay state changed from %d to %d Needs Flush!!", secure_display_active_,
|
||||
secure_display_active);
|
||||
secure_display_active_ = secure_display_active;
|
||||
skip_prepare_ = true;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user