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

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: Use a vectore of tuples of RGB components for IPC Created 5 years, 7 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 }
754
755 return false;
756 }
757
746 void DisplayConfigurator::PrepareForExit() { 758 void DisplayConfigurator::PrepareForExit() {
747 configure_display_ = false; 759 configure_display_ = false;
748 } 760 }
749 761
750 void DisplayConfigurator::SetDisplayPower( 762 void DisplayConfigurator::SetDisplayPower(
751 chromeos::DisplayPowerState power_state, 763 chromeos::DisplayPowerState power_state,
752 int flags, 764 int flags,
753 const ConfigurationCallback& callback) { 765 const ConfigurationCallback& callback) {
754 if (!configure_display_ || display_externally_controlled_) { 766 if (!configure_display_ || display_externally_controlled_) {
755 callback.Run(false); 767 callback.Run(false);
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
1001 FOR_EACH_OBSERVER( 1013 FOR_EACH_OBSERVER(
1002 Observer, observers_, OnDisplayModeChanged(cached_displays_)); 1014 Observer, observers_, OnDisplayModeChanged(cached_displays_));
1003 } else { 1015 } else {
1004 FOR_EACH_OBSERVER( 1016 FOR_EACH_OBSERVER(
1005 Observer, observers_, OnDisplayModeChangeFailed(cached_displays_, 1017 Observer, observers_, OnDisplayModeChangeFailed(cached_displays_,
1006 attempted_state)); 1018 attempted_state));
1007 } 1019 }
1008 } 1020 }
1009 1021
1010 } // namespace ui 1022 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698