| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 UI_GFX_OZONE_IMPL_HARDWARE_DISPLAY_CONTROLLER_OZONE_H_ | 5 #ifndef UI_GFX_OZONE_IMPL_HARDWARE_DISPLAY_CONTROLLER_OZONE_H_ |
| 6 #define UI_GFX_OZONE_IMPL_HARDWARE_DISPLAY_CONTROLLER_OZONE_H_ | 6 #define UI_GFX_OZONE_IMPL_HARDWARE_DISPLAY_CONTROLLER_OZONE_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 #include <xf86drmMode.h> | 10 #include <xf86drmMode.h> |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 | 106 |
| 107 // Set the hardware configuration for this HDCO. Once this is set, the HDCO is | 107 // Set the hardware configuration for this HDCO. Once this is set, the HDCO is |
| 108 // responsible for keeping track of the connector and CRTC and cleaning up | 108 // responsible for keeping track of the connector and CRTC and cleaning up |
| 109 // when it is destroyed. | 109 // when it is destroyed. |
| 110 void SetControllerInfo(DrmWrapperOzone* drm, | 110 void SetControllerInfo(DrmWrapperOzone* drm, |
| 111 uint32_t connector_id, | 111 uint32_t connector_id, |
| 112 uint32_t crtc_id, | 112 uint32_t crtc_id, |
| 113 drmModeModeInfo mode); | 113 drmModeModeInfo mode); |
| 114 | 114 |
| 115 // Associate the HDCO with a surface implementation and initialize it. | 115 // Associate the HDCO with a surface implementation and initialize it. |
| 116 bool BindSurfaceToController(SoftwareSurfaceOzone* surface); | 116 bool BindSurfaceToController(scoped_ptr<SoftwareSurfaceOzone> surface); |
| 117 | 117 |
| 118 // Schedules the |surface_|'s framebuffer to be displayed on the next vsync | 118 // Schedules the |surface_|'s framebuffer to be displayed on the next vsync |
| 119 // event. The event will be posted on the graphics card file descriptor |fd_| | 119 // event. The event will be posted on the graphics card file descriptor |fd_| |
| 120 // and it can be read and processed by |drmHandleEvent|. That function can | 120 // and it can be read and processed by |drmHandleEvent|. That function can |
| 121 // define the callback for the page flip event. A generic data argument will | 121 // define the callback for the page flip event. A generic data argument will |
| 122 // be presented to the callback. We use that argument to pass in the HDCO | 122 // be presented to the callback. We use that argument to pass in the HDCO |
| 123 // object the event belongs to. | 123 // object the event belongs to. |
| 124 // | 124 // |
| 125 // Between this call and the callback, the framebuffer used in this call | 125 // Between this call and the callback, the framebuffer used in this call |
| 126 // should not be modified in any way as it would cause screen tearing if the | 126 // should not be modified in any way as it would cause screen tearing if the |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 State state_; | 161 State state_; |
| 162 | 162 |
| 163 scoped_ptr<SoftwareSurfaceOzone> surface_; | 163 scoped_ptr<SoftwareSurfaceOzone> surface_; |
| 164 | 164 |
| 165 DISALLOW_COPY_AND_ASSIGN(HardwareDisplayControllerOzone); | 165 DISALLOW_COPY_AND_ASSIGN(HardwareDisplayControllerOzone); |
| 166 }; | 166 }; |
| 167 | 167 |
| 168 } // namespace gfx | 168 } // namespace gfx |
| 169 | 169 |
| 170 #endif // UI_GFX_OZONE_IMPL_HARDWARE_DISPLAY_CONTROLLER_OZONE_H_ | 170 #endif // UI_GFX_OZONE_IMPL_HARDWARE_DISPLAY_CONTROLLER_OZONE_H_ |
| OLD | NEW |