Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(271)

Unified Diff: ui/ozone/platform/drm/host/drm_overlay_manager.h

Issue 1631073002: Relocate ozone gbm overlay config cache to manager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased correctly Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/ozone/platform/drm/host/drm_overlay_manager.h
diff --git a/ui/ozone/platform/drm/host/drm_overlay_manager.h b/ui/ozone/platform/drm/host/drm_overlay_manager.h
index b52a9b647a71ba6a243161fc348b8fe70f3e7de0..754fae65b8dafcd4d44606bc8418777860e41a2f 100644
--- a/ui/ozone/platform/drm/host/drm_overlay_manager.h
+++ b/ui/ozone/platform/drm/host/drm_overlay_manager.h
@@ -6,27 +6,63 @@
#define UI_OZONE_PLATFORM_DRM_HOST_DRM_OVERLAY_MANAGER_H_
#include "base/macros.h"
+#include "ui/ozone/common/gpu/ozone_gpu_message_params.h"
+#include "ui/ozone/platform/drm/host/drm_overlay_manager_core.h"
+#include "ui/ozone/public/gpu_platform_support_host.h"
#include "ui/ozone/public/overlay_manager_ozone.h"
namespace ui {
-class DrmGpuPlatformSupportHost;
class DrmWindowHostManager;
+class DrmGpuPlatformSupportHost;
-class DrmOverlayManager : public OverlayManagerOzone {
+class DrmOverlayManager : public OverlayManagerOzone,
+ public GpuPlatformSupportHost {
public:
DrmOverlayManager(DrmGpuPlatformSupportHost* platform_support_host,
- DrmWindowHostManager* manager);
+ DrmWindowHostManager* window_manager);
~DrmOverlayManager() override;
// OverlayManagerOzone:
scoped_ptr<OverlayCandidatesOzone> CreateOverlayCandidates(
gfx::AcceleratedWidget w) override;
+ // GpuPlatformSupportHost:
+ void OnChannelEstablished(
+ int host_id,
+ scoped_refptr<base::SingleThreadTaskRunner> send_runner,
+ const base::Callback<void(IPC::Message*)>& sender) override;
+ void OnChannelDestroyed(int host_id) override;
+ bool OnMessageReceived(const IPC::Message& message) override;
+
+ void ResetCache();
+
private:
- DrmGpuPlatformSupportHost* platform_support_host_;
- DrmWindowHostManager* window_manager_;
- bool is_supported_;
+ // IPC handler.
+ class OverlayCandidatesIPC : public DrmOverlayManagerProxy {
+ public:
+ OverlayCandidatesIPC(DrmGpuPlatformSupportHost* platform_support,
+ DrmOverlayManager* parent);
+ ~OverlayCandidatesIPC() override;
+ void RegisterHandler() override;
+ bool IsConnected() override;
+ void UnregisterHandler() override;
+ bool CheckOverlayCapabilities(
+ gfx::AcceleratedWidget widget,
+ const std::vector<OverlayCheck_Params>& new_params) override;
+
+ private:
+ DrmGpuPlatformSupportHost* platform_support_;
+ DrmOverlayManager* parent_;
+ DISALLOW_COPY_AND_ASSIGN(OverlayCandidatesIPC);
+ };
+
+ // Entry point for incoming IPC.
+ void OnOverlayResult(gfx::AcceleratedWidget widget,
+ const std::vector<OverlayCheck_Params>& params);
+
+ scoped_ptr<OverlayCandidatesIPC> sender_;
+ scoped_ptr<DrmOverlayManagerCore> core_;
DISALLOW_COPY_AND_ASSIGN(DrmOverlayManager);
};
« no previous file with comments | « ui/ozone/platform/drm/host/drm_overlay_candidates_host_core.cc ('k') | ui/ozone/platform/drm/host/drm_overlay_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698