| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 | 72 |
| 73 // Returns the window associated with |widget|. Note: This function should be | 73 // Returns the window associated with |widget|. Note: This function should be |
| 74 // called only if a valid window has been associated with |widget|. | 74 // called only if a valid window has been associated with |widget|. |
| 75 DrmWindow* GetWindow(gfx::AcceleratedWidget widget); | 75 DrmWindow* GetWindow(gfx::AcceleratedWidget widget); |
| 76 | 76 |
| 77 // Updates the mapping between display controllers and windows such that a | 77 // Updates the mapping between display controllers and windows such that a |
| 78 // controller will be associated with at most one window. | 78 // controller will be associated with at most one window. |
| 79 void UpdateControllerToWindowMapping(); | 79 void UpdateControllerToWindowMapping(); |
| 80 | 80 |
| 81 private: | 81 private: |
| 82 typedef ScopedVector<HardwareDisplayController> HardwareDisplayControllers; | 82 typedef std::vector<scoped_ptr<HardwareDisplayController>> |
| 83 | 83 HardwareDisplayControllers; |
| 84 typedef base::ScopedPtrHashMap<gfx::AcceleratedWidget, scoped_ptr<DrmWindow>> | 84 typedef base::ScopedPtrHashMap<gfx::AcceleratedWidget, scoped_ptr<DrmWindow>> |
| 85 WidgetToWindowMap; | 85 WidgetToWindowMap; |
| 86 | 86 |
| 87 // Returns an iterator into |controllers_| for the controller identified by | 87 // Returns an iterator into |controllers_| for the controller identified by |
| 88 // (|crtc|, |connector|). | 88 // (|crtc|, |connector|). |
| 89 HardwareDisplayControllers::iterator FindDisplayController( | 89 HardwareDisplayControllers::iterator FindDisplayController( |
| 90 const scoped_refptr<DrmDevice>& drm, | 90 const scoped_refptr<DrmDevice>& drm, |
| 91 uint32_t crtc); | 91 uint32_t crtc); |
| 92 | 92 |
| 93 bool ActualConfigureDisplayController(const scoped_refptr<DrmDevice>& drm, | 93 bool ActualConfigureDisplayController(const scoped_refptr<DrmDevice>& drm, |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 HardwareDisplayControllers controllers_; | 129 HardwareDisplayControllers controllers_; |
| 130 | 130 |
| 131 WidgetToWindowMap window_map_; | 131 WidgetToWindowMap window_map_; |
| 132 | 132 |
| 133 DISALLOW_COPY_AND_ASSIGN(ScreenManager); | 133 DISALLOW_COPY_AND_ASSIGN(ScreenManager); |
| 134 }; | 134 }; |
| 135 | 135 |
| 136 } // namespace ui | 136 } // namespace ui |
| 137 | 137 |
| 138 #endif // UI_OZONE_PLATFORM_DRM_GPU_SCREEN_MANAGER_H_ | 138 #endif // UI_OZONE_PLATFORM_DRM_GPU_SCREEN_MANAGER_H_ |
| OLD | NEW |