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

Unified Diff: ui/aura/window_tree_host.cc

Issue 2345283002: aura: Allow platform to choose how it retrieves ICCProfile. (Closed)
Patch Set: Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: ui/aura/window_tree_host.cc
diff --git a/ui/aura/window_tree_host.cc b/ui/aura/window_tree_host.cc
index 902d8e94569e13608320f59b23f0c89ac1f39f9e..fc2800f32c4ecdb524945720ed872b3ae7cc35cc 100644
--- a/ui/aura/window_tree_host.cc
+++ b/ui/aura/window_tree_host.cc
@@ -69,11 +69,8 @@ void WindowTreeHost::InitCompositor() {
compositor_->SetScaleAndSize(GetDeviceScaleFactorFromDisplay(window()),
GetBounds().size());
compositor_->SetRootLayer(window()->layer());
-
- // TODO(hubbe): Get the color space from the *current* monitor and
- // update it when window is moved or color space configuration changes.
compositor_->SetDisplayColorSpace(
- gfx::ICCProfile::FromBestMonitor().GetColorSpace());
+ GetICCProfileForCurrentDisplay().GetColorSpace());
}
void WindowTreeHost::AddObserver(WindowTreeHostObserver* observer) {
@@ -320,6 +317,12 @@ ui::EventProcessor* WindowTreeHost::GetEventProcessor() {
////////////////////////////////////////////////////////////////////////////////
// WindowTreeHost, private:
+gfx::ICCProfile WindowTreeHost::GetICCProfileForCurrentDisplay() {
+ // TODO(hubbe): Get the color space from the *current* monitor and
+ // update it when window is moved or color space configuration changes.
+ return gfx::ICCProfile::FromBestMonitor();
+}
+
void WindowTreeHost::MoveCursorToInternal(const gfx::Point& root_location,
const gfx::Point& host_location) {
last_cursor_request_position_in_host_ = host_location;

Powered by Google App Engine
This is Rietveld 408576698