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

Side by Side Diff: ui/display/chromeos/display_configurator.cc

Issue 1028563003: Load and apply a vcgt table from an ICC file to the internal display (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add ash::DisplayColorManager Created 5 years, 8 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
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/chromeos/display_configurator.h" 5 #include "ui/display/chromeos/display_configurator.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/sys_info.h" 10 #include "base/sys_info.h"
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after
736 for (const DisplaySnapshot* display : cached_displays_) { 736 for (const DisplaySnapshot* display : cached_displays_) {
737 if (display->display_id() == display_id) { 737 if (display->display_id() == display_id) {
738 return native_display_delegate_->SetColorCalibrationProfile(*display, 738 return native_display_delegate_->SetColorCalibrationProfile(*display,
739 new_profile); 739 new_profile);
740 } 740 }
741 } 741 }
742 742
743 return false; 743 return false;
744 } 744 }
745 745
746 bool DisplayConfigurator::SetGammaRamp(int64_t display_id,
747 const std::vector<uint16_t>& r,
748 const std::vector<uint16_t>& g,
749 const std::vector<uint16_t>& b) {
750 for (const DisplaySnapshot* display : cached_displays_) {
751 if (display->display_id() == display_id) {
752 return native_display_delegate_->SetGammaRamp(*display, r, g, b);
753 }
oshima 2015/04/15 23:56:13 nuke {}
robert.bradford 2015/04/17 16:42:46 Done.
754 }
755
756 return false;
757 }
758
746 void DisplayConfigurator::PrepareForExit() { 759 void DisplayConfigurator::PrepareForExit() {
747 configure_display_ = false; 760 configure_display_ = false;
748 } 761 }
749 762
750 void DisplayConfigurator::SetDisplayPower( 763 void DisplayConfigurator::SetDisplayPower(
751 chromeos::DisplayPowerState power_state, 764 chromeos::DisplayPowerState power_state,
752 int flags, 765 int flags,
753 const ConfigurationCallback& callback) { 766 const ConfigurationCallback& callback) {
754 if (!configure_display_ || display_externally_controlled_) { 767 if (!configure_display_ || display_externally_controlled_) {
755 callback.Run(false); 768 callback.Run(false);
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
1001 FOR_EACH_OBSERVER( 1014 FOR_EACH_OBSERVER(
1002 Observer, observers_, OnDisplayModeChanged(cached_displays_)); 1015 Observer, observers_, OnDisplayModeChanged(cached_displays_));
1003 } else { 1016 } else {
1004 FOR_EACH_OBSERVER( 1017 FOR_EACH_OBSERVER(
1005 Observer, observers_, OnDisplayModeChangeFailed(cached_displays_, 1018 Observer, observers_, OnDisplayModeChangeFailed(cached_displays_,
1006 attempted_state)); 1019 attempted_state));
1007 } 1020 }
1008 } 1021 }
1009 1022
1010 } // namespace ui 1023 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698