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

Unified Diff: ui/ozone/platform/drm/host/drm_overlay_candidates_host.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
« no previous file with comments | « ui/ozone/platform/drm/gbm.gypi ('k') | ui/ozone/platform/drm/host/drm_overlay_candidates_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/drm/host/drm_overlay_candidates_host.h
diff --git a/ui/ozone/platform/drm/host/drm_overlay_candidates_host.h b/ui/ozone/platform/drm/host/drm_overlay_candidates_host.h
index 8cdbadccb7c86c224ddb44bf6089785fd09dbd18..113de504269f6f082adc478baa6d1c33eac950e9 100644
--- a/ui/ozone/platform/drm/host/drm_overlay_candidates_host.h
+++ b/ui/ozone/platform/drm/host/drm_overlay_candidates_host.h
@@ -10,16 +10,11 @@
#include <vector>
#include "base/macros.h"
-#include "ui/ozone/common/gpu/ozone_gpu_message_params.h"
-#include "ui/ozone/platform/drm/host/drm_overlay_candidates_host_core.h"
-#include "ui/ozone/public/gpu_platform_support_host.h"
#include "ui/ozone/public/overlay_candidates_ozone.h"
namespace ui {
-class DrmGpuPlatformSupportHost;
-class DrmWindowHost;
-class DrmOverlayCandidatesHost;
+class DrmOverlayManagerCore;
// This is an implementation of OverlayCandidatesOzone where the driver is asked
// about overlay capabilities via IPC. We have no way of querying abstract
@@ -30,59 +25,19 @@ class DrmOverlayCandidatesHost;
// the result is returned in OzoneHostMsg_OverlayCapabilitiesReceived. Testing
// is asynchronous, until the reply arrives that configuration will be failed.
//
-// There is a many:1 relationship between this class and
-// DrmGpuPlatformSupportHost, each compositor will own one of these objects.
-// Each request has a unique request ID, which is assigned from a shared
-// sequence number so that replies can be routed to the correct object.
-// TODO(rjkroege): Consider removing the dependency on
-// GpuPlatformSupportHost.
-class DrmOverlayCandidatesHost : public OverlayCandidatesOzone,
- public GpuPlatformSupportHost {
+// All OverlayCandidatesOzone objects share a single cache of tested
+// configurations stored in the overlay manager.
+class DrmOverlayCandidatesHost : public OverlayCandidatesOzone {
public:
- DrmOverlayCandidatesHost(DrmGpuPlatformSupportHost* platform_support,
- DrmWindowHost* window);
+ DrmOverlayCandidatesHost(DrmOverlayManagerCore* manager_core,
+ gfx::AcceleratedWidget widget);
~DrmOverlayCandidatesHost() override;
- // OverlayCandidatesOzone:
void CheckOverlaySupport(OverlaySurfaceCandidateList* candidates) 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;
-
private:
- class OverlayCandidatesIPC : public DrmOverlayCandidatesHostProxy {
- public:
- OverlayCandidatesIPC(DrmGpuPlatformSupportHost* platform_support,
- DrmOverlayCandidatesHost* 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_;
- DrmOverlayCandidatesHost* parent_;
- DISALLOW_COPY_AND_ASSIGN(OverlayCandidatesIPC);
- };
-
- // Entry point for incoming IPC.
- void OnOverlayResult(bool* handled,
- gfx::AcceleratedWidget widget,
- const std::vector<OverlayCheck_Params>& params);
-
- // Sends messages to the GPU thread.
- scoped_ptr<OverlayCandidatesIPC> sender_;
-
- // Implementation without messaging functionality.
- scoped_ptr<DrmOverlayCandidatesHostCore> core_;
+ DrmOverlayManagerCore* overlay_manager_; // Not owned.
+ gfx::AcceleratedWidget widget_;
DISALLOW_COPY_AND_ASSIGN(DrmOverlayCandidatesHost);
};
« no previous file with comments | « ui/ozone/platform/drm/gbm.gypi ('k') | ui/ozone/platform/drm/host/drm_overlay_candidates_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698