Index: ui/ozone/platform/drm/host/drm_overlay_manager_core.h |
diff --git a/ui/ozone/platform/drm/host/drm_overlay_candidates_host_core.h b/ui/ozone/platform/drm/host/drm_overlay_manager_core.h |
similarity index 50% |
rename from ui/ozone/platform/drm/host/drm_overlay_candidates_host_core.h |
rename to ui/ozone/platform/drm/host/drm_overlay_manager_core.h |
index eec43c5925bdc7648f5975494f046e557966a8aa..7a53a3d11717bbb4d22ecc66473a8b0ab6eade9d 100644 |
--- a/ui/ozone/platform/drm/host/drm_overlay_candidates_host_core.h |
+++ b/ui/ozone/platform/drm/host/drm_overlay_manager_core.h |
@@ -2,13 +2,13 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef UI_OZONE_PLATFORM_DRM_HOST_DRM_OVERLAY_CANDIDATES_CORE_H_ |
-#define UI_OZONE_PLATFORM_DRM_HOST_DRM_OVERLAY_CANDIDATES_CORE_H_ |
+#ifndef UI_OZONE_PLATFORM_DRM_HOST_DRM_OVERLAY_MANAGER_CORE_H_ |
+#define UI_OZONE_PLATFORM_DRM_HOST_DRM_OVERLAY_MANAGER_CORE_H_ |
#include <stdint.h> |
-#include <deque> |
-#include <map> |
+//#include <deque> |
+//#include <map> |
dnicoara
2016/01/26 14:14:23
nit: Remove commented includes.
rjkroege
2016/01/26 23:58:56
Done.
|
#include <vector> |
#include "base/containers/mru_cache.h" |
@@ -16,15 +16,15 @@ |
#include "base/memory/scoped_vector.h" |
#include "ui/ozone/common/gpu/ozone_gpu_message_params.h" |
#include "ui/ozone/public/overlay_candidates_ozone.h" |
+#include "ui/ozone/public/overlay_manager_ozone.h" |
namespace ui { |
- |
-class DrmWindowHost; |
+class DrmWindowHostManager; |
// Pluggable sender proxy abstract base class. |
-class DrmOverlayCandidatesHostProxy { |
+class DrmOverlayManagerProxy { |
public: |
- virtual ~DrmOverlayCandidatesHostProxy() = 0; |
+ virtual ~DrmOverlayManagerProxy() = 0; |
dnicoara
2016/01/26 14:14:23
Destructor needs an implementation.
rjkroege
2016/01/26 23:58:56
Done.
|
virtual bool IsConnected() = 0; |
virtual bool CheckOverlayCapabilities( |
gfx::AcceleratedWidget widget, |
@@ -33,29 +33,38 @@ class DrmOverlayCandidatesHostProxy { |
virtual void RegisterHandler() = 0; |
}; |
-// This is the core functionality of DrmOverlayCandidatesHost where the |
+// This is the core functionality of DrmOverlayManager where the |
// communication with the GPU thread is via a pluggable proxy. |
-class DrmOverlayCandidatesHostCore : public OverlayCandidatesOzone { |
+class DrmOverlayManagerCore : public OverlayManagerOzone { |
public: |
- DrmOverlayCandidatesHostCore(DrmOverlayCandidatesHostProxy* proxy, |
- DrmWindowHost* window); |
- ~DrmOverlayCandidatesHostCore() override; |
+ DrmOverlayManagerCore(DrmOverlayManagerProxy* proxy, |
+ DrmWindowHostManager* window_manager); |
+ ~DrmOverlayManagerCore() override; |
- // OverlayCandidatesOzone: |
- void CheckOverlaySupport(OverlaySurfaceCandidateList* candidates) override; |
+ // OverlayManagerOzone: |
+ scoped_ptr<OverlayCandidatesOzone> CreateOverlayCandidates( |
+ gfx::AcceleratedWidget w) override; |
void ResetCache(); |
void GpuSentOverlayResult(bool* handled, |
gfx::AcceleratedWidget widget, |
const std::vector<OverlayCheck_Params>& params); |
+ void CheckOverlaySupport( |
+ OverlayCandidatesOzone::OverlaySurfaceCandidateList* candidates, |
+ gfx::AcceleratedWidget widget); |
+ |
private: |
void SendOverlayValidationRequest( |
- const std::vector<OverlayCheck_Params>& list) const; |
- bool CanHandleCandidate(const OverlaySurfaceCandidate& candidate) const; |
+ const std::vector<OverlayCheck_Params>& new_params, |
+ gfx::AcceleratedWidget widget) const; |
+ bool CanHandleCandidate( |
+ const OverlayCandidatesOzone::OverlaySurfaceCandidate& candidate, |
+ gfx::AcceleratedWidget widget) const; |
- DrmOverlayCandidatesHostProxy* proxy_; // Not owned. |
- DrmWindowHost* window_; // Not owned. |
+ bool is_supported_; |
+ DrmOverlayManagerProxy* proxy_; // Not owned. |
+ DrmWindowHostManager* window_manager_; // Not owned. |
// List of all OverlayCheck_Params which have been validated in GPU side. |
// Value is set to true if we are waiting for validation results from GPU. |
@@ -63,9 +72,9 @@ class DrmOverlayCandidatesHostCore : public OverlayCandidatesOzone { |
bool, |
base::MRUCacheNullDeletor<bool>> cache_; |
- DISALLOW_COPY_AND_ASSIGN(DrmOverlayCandidatesHostCore); |
+ DISALLOW_COPY_AND_ASSIGN(DrmOverlayManagerCore); |
}; |
} // namespace ui |
-#endif // UI_OZONE_PLATFORM_DRM_HOST_DRM_OVERLAY_CANDIDATES_CORE_H_ |
+#endif // UI_OZONE_PLATFORM_DRM_HOST_DRM_OVERLAY_MANAGER_CORE_H_ |