summaryrefslogtreecommitdiffstats
path: root/ash
diff options
context:
space:
mode:
authordcastagna <dcastagna@chromium.org>2016-03-22 14:30:50 -0700
committerCommit bot <commit-bot@chromium.org>2016-03-22 21:31:53 +0000
commit1e6a2bc451904125ced0e829f030056b8e2bd8e2 (patch)
treeee7cfa1dea4d7b6142474568f637828382b9e892 /ash
parent1a87fbf87fc1ac4aaef80094be817c6b3a87dc1b (diff)
downloadchromium_src-1e6a2bc451904125ced0e829f030056b8e2bd8e2.zip
chromium_src-1e6a2bc451904125ced0e829f030056b8e2bd8e2.tar.gz
chromium_src-1e6a2bc451904125ced0e829f030056b8e2bd8e2.tar.bz2
Update secure output flags on display changes.
This patch adds a WindowTreeHostManager::Observer to exo that sets the appropriate output secure flag to the compositors when the display configuration changes. The first iteration for the logic that determines if the output is secure is simply a check if the connected display is internal and mirroring is disabled on all the devices. Additionally this patch moves the 'is_secure_' flag from the OutputSurface to LayerTreeImpl, since the lifetime of the latter better matches the display configuration changes. BUG=b/27173841,b/27174223 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1821553002 Cr-Commit-Position: refs/heads/master@{#382683}
Diffstat (limited to 'ash')
-rw-r--r--ash/display/window_tree_host_manager.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/ash/display/window_tree_host_manager.cc b/ash/display/window_tree_host_manager.cc
index 4b59621..13e143b 100644
--- a/ash/display/window_tree_host_manager.cc
+++ b/ash/display/window_tree_host_manager.cc
@@ -775,6 +775,16 @@ void WindowTreeHostManager::PostDisplayConfigurationChange() {
: layout.primary_id);
}
}
+
+ for (const gfx::Display& display : display_manager->active_display_list()) {
+ bool output_is_secure =
+ !display_manager->IsInMirrorMode() && display.IsInternal();
+ GetAshWindowTreeHostForDisplayId(display.id())
+ ->AsWindowTreeHost()
+ ->compositor()
+ ->SetOutputIsSecure(output_is_secure);
+ }
+
FOR_EACH_OBSERVER(Observer, observers_, OnDisplayConfigurationChanged());
UpdateMouseLocationAfterDisplayChange();
}