Index: chromeos/display/output_util.h |
diff --git a/chromeos/display/output_util.h b/chromeos/display/output_util.h |
index 345759df927fb07e054f445867c02d127bf78252..25e4f6bb7066f6b3809773a491a7af18518cdacb 100644 |
--- a/chromeos/display/output_util.h |
+++ b/chromeos/display/output_util.h |
@@ -13,6 +13,13 @@ |
// Forward declarations for Xlib and Xrandr. |
// This is so unused X definitions don't pollute the namespace. |
typedef unsigned long XID; |
+typedef XID RRMode; |
+struct _XRRModeInfo; |
+typedef _XRRModeInfo XRRModeInfo; |
+struct _XRRScreenResources; |
+typedef _XRRScreenResources XRRScreenResources; |
+struct _XRROutputInfo; |
+typedef _XRROutputInfo XRROutputInfo; |
namespace chromeos { |
@@ -57,6 +64,32 @@ CHROMEOS_EXPORT bool ParseOutputOverscanFlag(const unsigned char* prop, |
// Returns true if an output named |name| is an internal display. |
CHROMEOS_EXPORT bool IsInternalOutputName(const std::string& name); |
+// Find a XRRModeInfo that matches |mode|. |
+CHROMEOS_EXPORT const XRRModeInfo* FindModeInfo( |
+ const XRRScreenResources* screen_resources, |
+ XID mode); |
+ |
+// Find a mode that matches the given size with highest reflesh |
Daniel Erat
2013/07/31 17:34:05
nit: s/reflesh/refresh/
oshima
2013/07/31 21:59:49
Done.
|
+// rate. Non interlaced mode takes precedence, so non interlaced mode |
Daniel Erat
2013/07/31 17:34:05
nit:
Non-interlaced modes take precedence, so a n
oshima
2013/07/31 21:59:49
Done.
|
+// with lower refresh rate will be used even if there is an interlaced |
+// mode with higher refresh rate. |
+CHROMEOS_EXPORT RRMode FindOutputModeMatchingSize( |
+ const XRRScreenResources* screen_resources, |
+ const XRROutputInfo* output_info, |
+ size_t width, |
+ size_t height); |
+ |
+namespace test { |
+ |
+// Creates XRRModeInfo for unit tests. |
+CHROMEOS_EXPORT XRRModeInfo CreateModeInfo(int id, |
+ int width, |
+ int height, |
+ bool interlaced, |
+ float refresh_rate); |
+ |
+} // namespace test |
+ |
} // namespace chromeos |
#endif // CHROMEOS_DISPLAY_OUTPUT_UTIL_H_ |