| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_HOST_DRM_OVERLAY_MANAGER_H_ | 5 #ifndef UI_OZONE_PLATFORM_DRM_HOST_DRM_OVERLAY_MANAGER_H_ |
| 6 #define UI_OZONE_PLATFORM_DRM_HOST_DRM_OVERLAY_MANAGER_H_ | 6 #define UI_OZONE_PLATFORM_DRM_HOST_DRM_OVERLAY_MANAGER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/containers/mru_cache.h" | 12 #include "base/containers/mru_cache.h" |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "base/memory/scoped_vector.h" | 14 #include "base/memory/scoped_vector.h" |
| 15 #include "ui/ozone/platform/drm/host/gpu_thread_adapter.h" | 15 #include "ui/ozone/platform/drm/host/gpu_thread_adapter.h" |
| 16 #include "ui/ozone/public/overlay_candidates_ozone.h" | 16 #include "ui/ozone/public/overlay_candidates_ozone.h" |
| 17 #include "ui/ozone/public/overlay_manager_ozone.h" | 17 #include "ui/ozone/public/overlay_manager_ozone.h" |
| 18 | 18 |
| 19 namespace ui { | 19 namespace ui { |
| 20 class DrmWindowHostManager; | 20 class DrmWindowHostManager; |
| 21 | 21 |
| 22 class DrmOverlayManager : public OverlayManagerOzone { | 22 class DrmOverlayManager : public OverlayManagerOzone { |
| 23 public: | 23 public: |
| 24 DrmOverlayManager(GpuThreadAdapter* proxy, | 24 DrmOverlayManager(GpuThreadAdapter* proxy, |
| 25 DrmWindowHostManager* window_manager); | 25 DrmWindowHostManager* window_manager); |
| 26 ~DrmOverlayManager() override; | 26 ~DrmOverlayManager() override; |
| 27 | 27 |
| 28 // OverlayManagerOzone: | 28 // OverlayManagerOzone: |
| 29 scoped_ptr<OverlayCandidatesOzone> CreateOverlayCandidates( | 29 std::unique_ptr<OverlayCandidatesOzone> CreateOverlayCandidates( |
| 30 gfx::AcceleratedWidget w) override; | 30 gfx::AcceleratedWidget w) override; |
| 31 | 31 |
| 32 void ResetCache(); | 32 void ResetCache(); |
| 33 | 33 |
| 34 // Communication-free implementations of actions performed in response to | 34 // Communication-free implementations of actions performed in response to |
| 35 // messages from the GPU thread. | 35 // messages from the GPU thread. |
| 36 void GpuSentOverlayResult(gfx::AcceleratedWidget widget, | 36 void GpuSentOverlayResult(gfx::AcceleratedWidget widget, |
| 37 const std::vector<OverlayCheck_Params>& params); | 37 const std::vector<OverlayCheck_Params>& params); |
| 38 | 38 |
| 39 // Service method for DrmOverlayCandidatesHost | 39 // Service method for DrmOverlayCandidatesHost |
| (...skipping 16 matching lines...) Expand all Loading... |
| 56 // List of all OverlayCheck_Params which have been validated in GPU side. | 56 // List of all OverlayCheck_Params which have been validated in GPU side. |
| 57 // Value is set to true if we are waiting for validation results from GPU. | 57 // Value is set to true if we are waiting for validation results from GPU. |
| 58 base::MRUCache<std::vector<OverlayCheck_Params>, bool> cache_; | 58 base::MRUCache<std::vector<OverlayCheck_Params>, bool> cache_; |
| 59 | 59 |
| 60 DISALLOW_COPY_AND_ASSIGN(DrmOverlayManager); | 60 DISALLOW_COPY_AND_ASSIGN(DrmOverlayManager); |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 } // namespace ui | 63 } // namespace ui |
| 64 | 64 |
| 65 #endif // UI_OZONE_PLATFORM_DRM_HOST_DRM_OVERLAY_MANAGER_H_ | 65 #endif // UI_OZONE_PLATFORM_DRM_HOST_DRM_OVERLAY_MANAGER_H_ |
| OLD | NEW |