Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(72)

Unified Diff: services/ui/public/cpp/window_tree_client.cc

Issue 2540773002: Fix mus-in-renderer scale factor crash (Closed)
Patch Set: Jon needs to proof-read his comments Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/public/cpp/window_tree_client.cc
diff --git a/services/ui/public/cpp/window_tree_client.cc b/services/ui/public/cpp/window_tree_client.cc
index 9361d7316bd44724177c323799f71848fc11fe36..868e17f7d08b1fb7ecf10d474b53ca8290afa709 100644
--- a/services/ui/public/cpp/window_tree_client.cc
+++ b/services/ui/public/cpp/window_tree_client.cc
@@ -42,6 +42,11 @@ Id MakeTransportId(ClientSpecificId client_id, ClientSpecificId local_id) {
// Helper function to get the device_scale_factor() of the display::Display
// with |display_id|.
float ScaleFactorForDisplay(int64_t display_id) {
+ // TODO(jonross): Remove this once aura-mus is complete. Currently the screen
+ // is not being set properly for mus-in-renderer. (http://crbug.com/659155)
+ if (!display::Screen::GetScreen())
+ return 1.f;
+
// TODO(riajiang): Change to use display::GetDisplayWithDisplayId() after
// https://codereview.chromium.org/2361283002/ is landed.
std::vector<display::Display> displays =
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698