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

Side by Side Diff: ui/gfx/color_space.cc

Issue 2160133002: Revert of Support for retreiving the monitor color space on X11. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/BUILD.gn ('k') | ui/gfx/color_space_x11.cc » ('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 (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 "build/build_config.h" 5 #include "build/build_config.h"
6 #include "ui/gfx/color_space.h" 6 #include "ui/gfx/color_space.h"
7 7
8 namespace gfx { 8 namespace gfx {
9 9
10 namespace { 10 namespace {
(...skipping 11 matching lines...) Expand all
22 return icc_profile_ == other.icc_profile_; 22 return icc_profile_ == other.icc_profile_;
23 } 23 }
24 24
25 ColorSpace ColorSpace::FromICCProfile(const std::vector<char>& icc_profile) { 25 ColorSpace ColorSpace::FromICCProfile(const std::vector<char>& icc_profile) {
26 ColorSpace color_space; 26 ColorSpace color_space;
27 if (IsValidProfileLength(icc_profile.size())) 27 if (IsValidProfileLength(icc_profile.size()))
28 color_space.icc_profile_ = icc_profile; 28 color_space.icc_profile_ = icc_profile;
29 return color_space; 29 return color_space;
30 } 30 }
31 31
32 #if !defined(OS_WIN) && !defined(OS_MACOSX) && !defined(USE_X11) 32 #if !defined(OS_WIN) && !defined(OS_MACOSX)
33 // static 33 // static
34 ColorSpace ColorSpace::FromBestMonitor() { 34 ColorSpace ColorSpace::FromBestMonitor() {
35 return ColorSpace(); 35 return ColorSpace();
36 } 36 }
37 #endif 37 #endif
38 38
39 // static 39 // static
40 bool ColorSpace::IsValidProfileLength(size_t length) { 40 bool ColorSpace::IsValidProfileLength(size_t length) {
41 return length >= kMinProfileLength && length <= kMaxProfileLength; 41 return length >= kMinProfileLength && length <= kMaxProfileLength;
42 } 42 }
43 43
44 } // namespace gfx 44 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/BUILD.gn ('k') | ui/gfx/color_space_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698