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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 ScopedVector<HardwareDisplayController> HardwareDisplayControllers; |
83 | 83 |
84 typedef base::ScopedPtrHashMap<gfx::AcceleratedWidget, 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, |
94 uint32_t crtc, | 94 uint32_t crtc, |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 HardwareDisplayControllers controllers_; | 126 HardwareDisplayControllers controllers_; |
127 | 127 |
128 WidgetToWindowMap window_map_; | 128 WidgetToWindowMap window_map_; |
129 | 129 |
130 DISALLOW_COPY_AND_ASSIGN(ScreenManager); | 130 DISALLOW_COPY_AND_ASSIGN(ScreenManager); |
131 }; | 131 }; |
132 | 132 |
133 } // namespace ui | 133 } // namespace ui |
134 | 134 |
135 #endif // UI_OZONE_PLATFORM_DRM_GPU_SCREEN_MANAGER_H_ | 135 #endif // UI_OZONE_PLATFORM_DRM_GPU_SCREEN_MANAGER_H_ |
OLD | NEW |