| 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_OZONE_PLATFORM_DRM_GPU_SCREEN_MANAGER_H_ | 5 #ifndef UI_OZONE_PLATFORM_DRM_GPU_SCREEN_MANAGER_H_ |
| 6 #define UI_OZONE_PLATFORM_DRM_GPU_SCREEN_MANAGER_H_ | 6 #define UI_OZONE_PLATFORM_DRM_GPU_SCREEN_MANAGER_H_ |
| 7 | 7 |
| 8 #include "base/containers/scoped_ptr_hash_map.h" | 8 #include "base/containers/scoped_ptr_hash_map.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 HardwareDisplayControllers::iterator FindActiveDisplayControllerByLocation( | 101 HardwareDisplayControllers::iterator FindActiveDisplayControllerByLocation( |
| 102 const gfx::Rect& bounds); | 102 const gfx::Rect& bounds); |
| 103 | 103 |
| 104 // Tries to set the controller identified by (|crtc|, |connector|) to mirror | 104 // Tries to set the controller identified by (|crtc|, |connector|) to mirror |
| 105 // those in |mirror|. |original| is an iterator to the HDC where the | 105 // those in |mirror|. |original| is an iterator to the HDC where the |
| 106 // controller is currently present. | 106 // controller is currently present. |
| 107 bool HandleMirrorMode(HardwareDisplayControllers::iterator original, | 107 bool HandleMirrorMode(HardwareDisplayControllers::iterator original, |
| 108 HardwareDisplayControllers::iterator mirror, | 108 HardwareDisplayControllers::iterator mirror, |
| 109 const scoped_refptr<DrmDevice>& drm, | 109 const scoped_refptr<DrmDevice>& drm, |
| 110 uint32_t crtc, | 110 uint32_t crtc, |
| 111 uint32_t connector); | 111 uint32_t connector, |
| 112 const drmModeModeInfo& mode); |
| 113 |
| 114 OverlayPlane GetModesetBuffer(HardwareDisplayController* controller, |
| 115 const gfx::Rect& bounds); |
| 116 |
| 117 bool EnableController(HardwareDisplayController* controller); |
| 112 | 118 |
| 113 // Modeset the |controller| using |origin| and |mode|. If there is a window at | 119 // Modeset the |controller| using |origin| and |mode|. If there is a window at |
| 114 // the controller location, then we'll re-use the current buffer. | 120 // the controller location, then we'll re-use the current buffer. |
| 115 bool EnableController(HardwareDisplayController* controller, | 121 bool ModesetController(HardwareDisplayController* controller, |
| 116 const gfx::Point& origin, | 122 const gfx::Point& origin, |
| 117 const drmModeModeInfo& mode); | 123 const drmModeModeInfo& mode); |
| 118 | 124 |
| 119 DrmWindow* FindWindowAt(const gfx::Rect& bounds) const; | 125 DrmWindow* FindWindowAt(const gfx::Rect& bounds) const; |
| 120 | 126 |
| 121 ScanoutBufferGenerator* buffer_generator_; // Not owned. | 127 ScanoutBufferGenerator* buffer_generator_; // Not owned. |
| 122 // List of display controllers (active and disabled). | 128 // List of display controllers (active and disabled). |
| 123 HardwareDisplayControllers controllers_; | 129 HardwareDisplayControllers controllers_; |
| 124 | 130 |
| 125 WidgetToWindowMap window_map_; | 131 WidgetToWindowMap window_map_; |
| 126 | 132 |
| 127 DISALLOW_COPY_AND_ASSIGN(ScreenManager); | 133 DISALLOW_COPY_AND_ASSIGN(ScreenManager); |
| 128 }; | 134 }; |
| 129 | 135 |
| 130 } // namespace ui | 136 } // namespace ui |
| 131 | 137 |
| 132 #endif // UI_OZONE_PLATFORM_DRM_GPU_SCREEN_MANAGER_H_ | 138 #endif // UI_OZONE_PLATFORM_DRM_GPU_SCREEN_MANAGER_H_ |
| OLD | NEW |