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

Unified Diff: ui/ozone/platform/drm/gpu/drm_thread_message_proxy.h

Issue 1311043016: Switch DRM platform to using a separate thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mv-drm-calls-on-thread2
Patch Set: update & fix clang Created 5 years, 2 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/gpu/drm_thread.cc ('k') | ui/ozone/platform/drm/gpu/drm_thread_message_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/drm/gpu/drm_thread_message_proxy.h
diff --git a/ui/ozone/platform/drm/gpu/drm_gpu_platform_support.h b/ui/ozone/platform/drm/gpu/drm_thread_message_proxy.h
similarity index 55%
copy from ui/ozone/platform/drm/gpu/drm_gpu_platform_support.h
copy to ui/ozone/platform/drm/gpu/drm_thread_message_proxy.h
index 21caf35e6550877b29c2cadb9133d99aad7ba639..b07fead329e5613310bc2774eb0dc3b9eb87f7f9 100644
--- a/ui/ozone/platform/drm/gpu/drm_gpu_platform_support.h
+++ b/ui/ozone/platform/drm/gpu/drm_thread_message_proxy.h
@@ -1,23 +1,19 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
+// Copyright 2015 The Chromium Authors. All rights reserved.
// 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_GPU_DRM_GPU_PLATFORM_SUPPORT_H_
-#define UI_OZONE_PLATFORM_DRM_GPU_DRM_GPU_PLATFORM_SUPPORT_H_
+#ifndef UI_OZONE_PLATFORM_DRM_GPU_DRM_THREAD_MESSAGE_PROXY_H_
+#define UI_OZONE_PLATFORM_DRM_GPU_DRM_THREAD_MESSAGE_PROXY_H_
-#include "base/containers/scoped_ptr_hash_map.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/weak_ptr.h"
#include "ipc/message_filter.h"
#include "ui/display/types/display_constants.h"
+#include "ui/display/types/gamma_ramp_rgb_entry.h"
#include "ui/gfx/native_widget_types.h"
-#include "ui/ozone/public/gpu_platform_support.h"
-
-class SkBitmap;
namespace base {
-class FilePath;
-class SingleThreadTaskRunner;
struct FileDescriptor;
+class FilePath;
}
namespace gfx {
@@ -27,34 +23,22 @@ class Rect;
namespace ui {
-class DrmDeviceManager;
-class DrmGpuDisplayManager;
-class DrmSurfaceFactory;
-class DrmWindow;
-class ScreenManager;
-class ScanoutBufferGenerator;
-
+class DrmThread;
struct DisplayMode_Params;
struct DisplaySnapshot_Params;
struct OverlayCheck_Params;
-struct GammaRampRGBEntry;
-class DrmGpuPlatformSupport : public GpuPlatformSupport {
+class DrmThreadMessageProxy : public IPC::MessageFilter {
public:
- DrmGpuPlatformSupport(DrmDeviceManager* drm_device_manager,
- ScreenManager* screen_manager,
- ScanoutBufferGenerator* buffer_generator,
- scoped_ptr<DrmGpuDisplayManager> display_manager);
- ~DrmGpuPlatformSupport() override;
-
- // GpuPlatformSupport:
- void OnChannelEstablished(IPC::Sender* sender) override;
- IPC::MessageFilter* GetMessageFilter() override;
+ DrmThreadMessageProxy(DrmThread* drm_thread);
- // IPC::Listener:
+ // IPC::MessageFilter:
+ void OnFilterAdded(IPC::Sender* sender) override;
bool OnMessageReceived(const IPC::Message& message) override;
private:
+ ~DrmThreadMessageProxy() override;
+
void OnCreateWindow(gfx::AcceleratedWidget widget);
void OnDestroyWindow(gfx::AcceleratedWidget widget);
void OnWindowBoundsChanged(gfx::AcceleratedWidget widget,
@@ -83,18 +67,29 @@ class DrmGpuPlatformSupport : public GpuPlatformSupport {
void OnSetHDCPState(int64_t display_id, HDCPState state);
void OnSetGammaRamp(int64_t id, const std::vector<GammaRampRGBEntry>& lut);
- void SetIOTaskRunner(
- const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner);
+ void OnCheckOverlayCapabilitiesCallback(
+ gfx::AcceleratedWidget widget,
+ const std::vector<OverlayCheck_Params>& overlays) const;
+ void OnRefreshNativeDisplaysCallback(
+ const std::vector<DisplaySnapshot_Params>& displays) const;
+ void OnConfigureNativeDisplayCallback(int64_t display_id, bool success) const;
+ void OnDisableNativeDisplayCallback(int64_t display_id, bool success) const;
+ void OnTakeDisplayControlCallback(bool success) const;
+ void OnRelinquishDisplayControlCallback(bool success) const;
+ void OnGetHDCPStateCallback(int64_t display_id,
+ bool success,
+ HDCPState state) const;
+ void OnSetHDCPStateCallback(int64_t display_id, bool success) const;
+
+ DrmThread* drm_thread_;
+
+ IPC::Sender* sender_ = nullptr;
- IPC::Sender* sender_ = nullptr; // Not owned.
- DrmDeviceManager* drm_device_manager_; // Not owned.
- ScreenManager* screen_manager_; // Not owned.
- ScanoutBufferGenerator* buffer_generator_; // Not owned.
+ base::WeakPtrFactory<DrmThreadMessageProxy> weak_ptr_factory_;
- scoped_ptr<DrmGpuDisplayManager> display_manager_;
- scoped_refptr<IPC::MessageFilter> filter_;
+ DISALLOW_COPY_AND_ASSIGN(DrmThreadMessageProxy);
};
} // namespace ui
-#endif // UI_OZONE_PLATFORM_DRM_GPU_DRM_GPU_PLATFORM_SUPPORT_H_
+#endif // UI_OZONE_PLATFORM_DRM_GPU_DRM_THREAD_MESSAGE_PROXY_H_
« no previous file with comments | « ui/ozone/platform/drm/gpu/drm_thread.cc ('k') | ui/ozone/platform/drm/gpu/drm_thread_message_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698