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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_screen_x11.cc

Issue 2950183002: color: Use ICCProfile from display::Display instead of FromBestMonitor (Closed)
Patch Set: Use forced color profile in display::Display ctor Created 3 years, 5 months 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 unified diff | Download patch
« no previous file with comments | « ui/gfx/icc_profile.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/views/widget/desktop_aura/desktop_screen_x11.h" 5 #include "ui/views/widget/desktop_aura/desktop_screen_x11.h"
6 6
7 #include <X11/extensions/Xrandr.h> 7 #include <X11/extensions/Xrandr.h>
8 #include <X11/Xlib.h> 8 #include <X11/Xlib.h>
9 9
10 // It clashes with out RootWindow. 10 // It clashes with out RootWindow.
11 #undef RootWindow 11 #undef RootWindow
12 12
13 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "base/trace_event/trace_event.h" 14 #include "base/trace_event/trace_event.h"
15 #include "ui/aura/window.h" 15 #include "ui/aura/window.h"
16 #include "ui/aura/window_event_dispatcher.h" 16 #include "ui/aura/window_event_dispatcher.h"
17 #include "ui/aura/window_tree_host.h" 17 #include "ui/aura/window_tree_host.h"
18 #include "ui/base/layout.h" 18 #include "ui/base/layout.h"
19 #include "ui/display/display.h" 19 #include "ui/display/display.h"
20 #include "ui/display/display_finder.h" 20 #include "ui/display/display_finder.h"
21 #include "ui/display/screen.h" 21 #include "ui/display/screen.h"
22 #include "ui/display/util/display_util.h" 22 #include "ui/display/util/display_util.h"
23 #include "ui/display/util/x11/edid_parser_x11.h" 23 #include "ui/display/util/x11/edid_parser_x11.h"
24 #include "ui/events/platform/platform_event_source.h" 24 #include "ui/events/platform/platform_event_source.h"
25 #include "ui/events/platform/x11/x11_event_source.h" 25 #include "ui/events/platform/x11/x11_event_source.h"
26 #include "ui/gfx/font_render_params.h" 26 #include "ui/gfx/font_render_params.h"
27 #include "ui/gfx/geometry/point_conversions.h" 27 #include "ui/gfx/geometry/point_conversions.h"
28 #include "ui/gfx/geometry/size_conversions.h" 28 #include "ui/gfx/geometry/size_conversions.h"
29 #include "ui/gfx/icc_profile.h"
29 #include "ui/gfx/native_widget_types.h" 30 #include "ui/gfx/native_widget_types.h"
30 #include "ui/gfx/x/x11_atom_cache.h" 31 #include "ui/gfx/x/x11_atom_cache.h"
31 #include "ui/gfx/x/x11_types.h" 32 #include "ui/gfx/x/x11_types.h"
32 #include "ui/views/linux_ui/linux_ui.h" 33 #include "ui/views/linux_ui/linux_ui.h"
33 #include "ui/views/widget/desktop_aura/desktop_screen.h" 34 #include "ui/views/widget/desktop_aura/desktop_screen.h"
34 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h" 35 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h"
35 #include "ui/views/widget/desktop_aura/x11_topmost_window_finder.h" 36 #include "ui/views/widget/desktop_aura/x11_topmost_window_finder.h"
36 37
37 namespace { 38 namespace {
38 39
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 display.set_rotation(display::Display::ROTATE_180); 368 display.set_rotation(display::Display::ROTATE_180);
368 break; 369 break;
369 case RR_Rotate_270: 370 case RR_Rotate_270:
370 display.set_rotation(display::Display::ROTATE_270); 371 display.set_rotation(display::Display::ROTATE_270);
371 break; 372 break;
372 } 373 }
373 374
374 if (is_primary_display) 375 if (is_primary_display)
375 primary_display_index_ = displays.size(); 376 primary_display_index_ = displays.size();
376 377
378 // TODO(ccameron): Populate this based on this specific display.
379 // http://crbug.com/735613
380 display.set_color_space(
381 gfx::ICCProfile::FromBestMonitor().GetColorSpace());
382
377 displays.push_back(display); 383 displays.push_back(display);
378 } 384 }
379 } 385 }
380 386
381 if (displays.empty()) 387 if (displays.empty())
382 return GetFallbackDisplayList(); 388 return GetFallbackDisplayList();
383 389
384 return displays; 390 return displays;
385 } 391 }
386 392
(...skipping 10 matching lines...) Expand all
397 GetPrimaryDisplay().device_scale_factor()); 403 GetPrimaryDisplay().device_scale_factor());
398 } 404 }
399 405
400 //////////////////////////////////////////////////////////////////////////////// 406 ////////////////////////////////////////////////////////////////////////////////
401 407
402 display::Screen* CreateDesktopScreen() { 408 display::Screen* CreateDesktopScreen() {
403 return new DesktopScreenX11; 409 return new DesktopScreenX11;
404 } 410 }
405 411
406 } // namespace views 412 } // namespace views
OLDNEW
« no previous file with comments | « ui/gfx/icc_profile.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698