Chromium Code Reviews| Index: ui/display/chromeos/display_configurator.cc |
| diff --git a/ui/display/chromeos/display_configurator.cc b/ui/display/chromeos/display_configurator.cc |
| index 19e122566e8412af5a1c2d3a5670a1acaeecf42e..a7443d26be80da504455a68c7d10f58cbb965dff 100644 |
| --- a/ui/display/chromeos/display_configurator.cc |
| +++ b/ui/display/chromeos/display_configurator.cc |
| @@ -251,12 +251,18 @@ bool DisplayConfigurator::ApplyProtections(const ContentProtections& requests) { |
| case DISPLAY_CONNECTION_TYPE_DISPLAYPORT: |
| case DISPLAY_CONNECTION_TYPE_DVI: |
| case DISPLAY_CONNECTION_TYPE_HDMI: { |
| - HDCPState new_desired_state = |
| - (all_desired & CONTENT_PROTECTION_METHOD_HDCP) ? |
| - HDCP_STATE_DESIRED : HDCP_STATE_UNDESIRED; |
| - if (!native_display_delegate_->SetHDCPState(*it->display, |
| - new_desired_state)) |
| + HDCPState now_state; |
|
Daniel Erat
2014/09/18 14:45:30
nit: current_state
kcwu
2014/09/19 04:39:14
Done.
|
| + if (!native_display_delegate_->GetHDCPState(*it->display, &now_state)) |
|
Daniel Erat
2014/09/18 14:45:30
does this trigger a slow probe of the display?
dnicoara
2014/09/18 15:39:16
crbug.com/374465 tracked an issue where GetHDCP wa
kcwu
2014/09/19 04:39:14
The driver is fixed. See comment #2 in crbug/41284
|
| return false; |
| + bool now_desired = (now_state != HDCP_STATE_UNDESIRED); |
|
Daniel Erat
2014/09/18 14:45:30
nit: s/now/current/; "new" and "now" look too simi
kcwu
2014/09/19 04:39:15
Done.
|
| + bool new_desired = (all_desired & CONTENT_PROTECTION_METHOD_HDCP); |
| + // Don't enable again if HDCP is already active. |
| + if (now_desired != new_desired) { |
| + HDCPState new_state = |
| + new_desired ? HDCP_STATE_DESIRED : HDCP_STATE_UNDESIRED; |
| + if (!native_display_delegate_->SetHDCPState(*it->display, new_state)) |
| + return false; |
| + } |
| break; |
| } |
| case DISPLAY_CONNECTION_TYPE_INTERNAL: |