| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #ifndef CHROMEOS_DISPLAY_OUTPUT_UTIL_H_ | 5 #ifndef CHROMEOS_DISPLAY_OUTPUT_UTIL_H_ |
| 6 #define CHROMEOS_DISPLAY_OUTPUT_UTIL_H_ | 6 #define CHROMEOS_DISPLAY_OUTPUT_UTIL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 // Parses |prop| as EDID data and stores the overscan flag to |flag|. Returns | 58 // Parses |prop| as EDID data and stores the overscan flag to |flag|. Returns |
| 59 // true if the flag is found. This is exported for x11_util_unittest.cc. | 59 // true if the flag is found. This is exported for x11_util_unittest.cc. |
| 60 CHROMEOS_EXPORT bool ParseOutputOverscanFlag(const unsigned char* prop, | 60 CHROMEOS_EXPORT bool ParseOutputOverscanFlag(const unsigned char* prop, |
| 61 unsigned long nitems, | 61 unsigned long nitems, |
| 62 bool* flag); | 62 bool* flag); |
| 63 | 63 |
| 64 // Returns true if an output named |name| is an internal display. | 64 // Returns true if an output named |name| is an internal display. |
| 65 CHROMEOS_EXPORT bool IsInternalOutputName(const std::string& name); | 65 CHROMEOS_EXPORT bool IsInternalOutputName(const std::string& name); |
| 66 | 66 |
| 67 // Find a XRRModeInfo that matches |mode|. | 67 // Find a XRRModeInfo that matches |mode|. |
| 68 CHROMEOS_EXPORT const XRRModeInfo* FindModeInfo( | 68 CHROMEOS_EXPORT const XRRModeInfo* FindXRRModeInfo( |
| 69 const XRRScreenResources* screen_resources, | 69 const XRRScreenResources* screen_resources, |
| 70 XID mode); | 70 XID mode); |
| 71 | 71 |
| 72 // Find a mode that matches the given size with highest refresh | 72 // Find a mode that matches the given size with highest refresh |
| 73 // rate. Non-interlaced mode takes precedence, so non-interlaced mode | 73 // rate. Non-interlaced mode takes precedence, so non-interlaced mode |
| 74 // with a lower refresh rate will be used even if there is an interlaced | 74 // with a lower refresh rate will be used even if there is an interlaced |
| 75 // mode with a higher refresh rate. | 75 // mode with a higher refresh rate. |
| 76 CHROMEOS_EXPORT RRMode FindOutputModeMatchingSize( | 76 CHROMEOS_EXPORT RRMode FindOutputModeMatchingSize( |
| 77 const XRRScreenResources* screen_resources, | 77 const XRRScreenResources* screen_resources, |
| 78 const XRROutputInfo* output_info, | 78 const XRROutputInfo* output_info, |
| 79 size_t width, | 79 size_t width, |
| 80 size_t height); | 80 size_t height); |
| 81 | 81 |
| 82 namespace test { | 82 namespace test { |
| 83 | 83 |
| 84 // Creates XRRModeInfo for unit tests. | 84 // Creates XRRModeInfo for unit tests. |
| 85 CHROMEOS_EXPORT XRRModeInfo CreateModeInfo(int id, | 85 CHROMEOS_EXPORT XRRModeInfo CreateModeInfo(int id, |
| 86 int width, | 86 int width, |
| 87 int height, | 87 int height, |
| 88 bool interlaced, | 88 bool interlaced, |
| 89 float refresh_rate); | 89 float refresh_rate); |
| 90 | 90 |
| 91 } // namespace test | 91 } // namespace test |
| 92 | 92 |
| 93 } // namespace chromeos | 93 } // namespace chromeos |
| 94 | 94 |
| 95 #endif // CHROMEOS_DISPLAY_OUTPUT_UTIL_H_ | 95 #endif // CHROMEOS_DISPLAY_OUTPUT_UTIL_H_ |
| OLD | NEW |