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 #ifndef UI_DISPLAY_CHROMEOS_X11_NATIVE_DISPLAY_DELEGATE_X11_H_ | 5 #ifndef UI_DISPLAY_CHROMEOS_X11_NATIVE_DISPLAY_DELEGATE_X11_H_ |
6 #define UI_DISPLAY_CHROMEOS_X11_NATIVE_DISPLAY_DELEGATE_X11_H_ | 6 #define UI_DISPLAY_CHROMEOS_X11_NATIVE_DISPLAY_DELEGATE_X11_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 // Parses all the modes made available by |screen_|. | 101 // Parses all the modes made available by |screen_|. |
102 void InitModes(); | 102 void InitModes(); |
103 | 103 |
104 // Helper method for GetOutputs() that returns an OutputSnapshot struct based | 104 // Helper method for GetOutputs() that returns an OutputSnapshot struct based |
105 // on the passed-in information. | 105 // on the passed-in information. |
106 DisplaySnapshotX11* InitDisplaySnapshot(RROutput id, | 106 DisplaySnapshotX11* InitDisplaySnapshot(RROutput id, |
107 XRROutputInfo* info, | 107 XRROutputInfo* info, |
108 RRCrtc* last_used_crtc, | 108 RRCrtc* last_used_crtc, |
109 int index); | 109 int index); |
110 | 110 |
111 // Destroys unused CRTCs and parks used CRTCs in a way which allows a | 111 // Destroys unused CRTCs. |
112 // framebuffer resize. This is faster than turning them off, resizing, | 112 void DestroyUnusedCrtcs(); |
113 // then turning them back on. | 113 |
114 void DestroyUnusedCrtcs(const gfx::Size& new_size); | 114 // Parks used CRTCs in a way which allows a framebuffer resize. This is faster |
| 115 // than turning them off, resizing, then turning them back on. |
| 116 // |min_screen_size| represent the smallest size between the current |
| 117 // framebuffer size and the requested framebuffer size. |
| 118 void UpdateCrtcsForNewFramebuffer(const gfx::Size& min_screen_size); |
115 | 119 |
116 bool ConfigureCrtc(RRCrtc crtc, RRMode mode, RROutput output, int x, int y); | 120 bool ConfigureCrtc(RRCrtc crtc, RRMode mode, RROutput output, int x, int y); |
117 | 121 |
118 // Returns whether |id| is configured to preserve aspect when scaling. | 122 // Returns whether |id| is configured to preserve aspect when scaling. |
119 bool IsOutputAspectPreservingScaling(RROutput id); | 123 bool IsOutputAspectPreservingScaling(RROutput id); |
120 | 124 |
121 // Creates the gamma ramp for |new_profile|, or NULL if it doesn't exist. | 125 // Creates the gamma ramp for |new_profile|, or NULL if it doesn't exist. |
122 // The caller should take the ownership. | 126 // The caller should take the ownership. |
123 XRRCrtcGamma* CreateGammaRampForProfile( | 127 XRRCrtcGamma* CreateGammaRampForProfile( |
124 const DisplaySnapshotX11& x11_output, | 128 const DisplaySnapshotX11& x11_output, |
(...skipping 28 matching lines...) Expand all Loading... |
153 | 157 |
154 // A background color used during boot time + multi displays. | 158 // A background color used during boot time + multi displays. |
155 uint32_t background_color_argb_; | 159 uint32_t background_color_argb_; |
156 | 160 |
157 DISALLOW_COPY_AND_ASSIGN(NativeDisplayDelegateX11); | 161 DISALLOW_COPY_AND_ASSIGN(NativeDisplayDelegateX11); |
158 }; | 162 }; |
159 | 163 |
160 } // namespace ui | 164 } // namespace ui |
161 | 165 |
162 #endif // UI_DISPLAY_CHROMEOS_X11_NATIVE_DISPLAY_DELEGATE_X11_H_ | 166 #endif // UI_DISPLAY_CHROMEOS_X11_NATIVE_DISPLAY_DELEGATE_X11_H_ |
OLD | NEW |