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

Side by Side Diff: ui/display/display_change_notifier.cc

Issue 2963223002: propagate display color space changes (Closed)
Patch Set: 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 | « no previous file | ui/display/display_observer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/display/display_change_notifier.h" 5 #include "ui/display/display_change_notifier.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "ui/display/display.h" 9 #include "ui/display/display.h"
10 #include "ui/display/display_observer.h" 10 #include "ui/display/display_observer.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 if (new_it->rotation() != old_it->rotation()) 74 if (new_it->rotation() != old_it->rotation())
75 metrics |= DisplayObserver::DISPLAY_METRIC_ROTATION; 75 metrics |= DisplayObserver::DISPLAY_METRIC_ROTATION;
76 76
77 if (new_it->work_area() != old_it->work_area()) 77 if (new_it->work_area() != old_it->work_area())
78 metrics |= DisplayObserver::DISPLAY_METRIC_WORK_AREA; 78 metrics |= DisplayObserver::DISPLAY_METRIC_WORK_AREA;
79 79
80 if (new_it->device_scale_factor() != old_it->device_scale_factor()) 80 if (new_it->device_scale_factor() != old_it->device_scale_factor())
81 metrics |= DisplayObserver::DISPLAY_METRIC_DEVICE_SCALE_FACTOR; 81 metrics |= DisplayObserver::DISPLAY_METRIC_DEVICE_SCALE_FACTOR;
82 82
83 if (new_it->color_space() != old_it->color_space())
84 metrics |= DisplayObserver::DISPLAY_METRIC_COLOR_SPACE;
85
83 if (metrics != DisplayObserver::DISPLAY_METRIC_NONE) { 86 if (metrics != DisplayObserver::DISPLAY_METRIC_NONE) {
84 for (DisplayObserver& observer : observer_list_) 87 for (DisplayObserver& observer : observer_list_)
85 observer.OnDisplayMetricsChanged(*new_it, metrics); 88 observer.OnDisplayMetricsChanged(*new_it, metrics);
86 } 89 }
87 } 90 }
88 } 91 }
89 92
90 } // namespace display 93 } // namespace display
OLDNEW
« no previous file with comments | « no previous file | ui/display/display_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698