OLD | NEW |
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/gfx/color_profile.h" | 5 #include "ui/gfx/color_profile.h" |
6 | 6 |
7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
| 8 #include <stddef.h> |
8 | 9 |
9 #include "base/mac/mac_util.h" | 10 #include "base/mac/mac_util.h" |
10 #include "base/mac/scoped_cftyperef.h" | 11 #include "base/mac/scoped_cftyperef.h" |
11 #include "ui/gfx/mac/coordinate_conversion.h" | 12 #include "ui/gfx/mac/coordinate_conversion.h" |
12 | 13 |
13 namespace { | 14 namespace { |
14 | 15 |
15 NSScreen* GetNSScreenFromBounds(const gfx::Rect& bounds) { | 16 NSScreen* GetNSScreenFromBounds(const gfx::Rect& bounds) { |
16 NSScreen* screen = nil; | 17 NSScreen* screen = nil; |
17 int overlap = 0; | 18 int overlap = 0; |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 if (!icc_profile) | 80 if (!icc_profile) |
80 return; | 81 return; |
81 size_t length = CFDataGetLength(icc_profile); | 82 size_t length = CFDataGetLength(icc_profile); |
82 if (gfx::InvalidColorProfileLength(length)) | 83 if (gfx::InvalidColorProfileLength(length)) |
83 return; | 84 return; |
84 const unsigned char* data = CFDataGetBytePtr(icc_profile); | 85 const unsigned char* data = CFDataGetBytePtr(icc_profile); |
85 profile->assign(data, data + length); | 86 profile->assign(data, data + length); |
86 } | 87 } |
87 | 88 |
88 } // namespace gfx | 89 } // namespace gfx |
OLD | NEW |