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

Unified Diff: ui/ozone/platform/dri/dri_gpu_platform_support.cc

Issue 856423002: [Ozone-Dri] Decouple the IO helper thread from DriWrapper (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gbm-wrapper
Patch Set: . Created 5 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/dri/dri_gpu_platform_support.h ('k') | ui/ozone/platform/dri/dri_helper_thread.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/dri/dri_gpu_platform_support.cc
diff --git a/ui/ozone/platform/dri/dri_gpu_platform_support.cc b/ui/ozone/platform/dri/dri_gpu_platform_support.cc
index 13c16da2cd14a1af78f3f08dd8198ecd81ee7bd4..a9036b4a1f097aaff27e2fd0ed18707fc3654f1f 100644
--- a/ui/ozone/platform/dri/dri_gpu_platform_support.cc
+++ b/ui/ozone/platform/dri/dri_gpu_platform_support.cc
@@ -12,6 +12,7 @@
#include "ui/ozone/common/display_util.h"
#include "ui/ozone/common/gpu/ozone_gpu_message_params.h"
#include "ui/ozone/common/gpu/ozone_gpu_messages.h"
+#include "ui/ozone/platform/dri/dri_helper_thread.h"
#include "ui/ozone/platform/dri/dri_window_delegate_impl.h"
#include "ui/ozone/platform/dri/dri_window_delegate_manager.h"
#include "ui/ozone/platform/dri/native_display_delegate_dri.h"
@@ -29,8 +30,10 @@ void MessageProcessedOnMain(
class DriGpuPlatformSupportMessageFilter : public IPC::MessageFilter {
public:
DriGpuPlatformSupportMessageFilter(DriWindowDelegateManager* window_manager,
+ DriHelperThread* helper_thread,
IPC::Listener* main_thread_listener)
: window_manager_(window_manager),
+ helper_thread_(helper_thread),
main_thread_listener_(main_thread_listener),
main_thread_task_runner_(base::ThreadTaskRunnerHandle::Get()),
pending_main_thread_operations_(0),
@@ -39,6 +42,8 @@ class DriGpuPlatformSupportMessageFilter : public IPC::MessageFilter {
void OnFilterAdded(IPC::Sender* sender) override {
io_thread_task_runner_ = base::ThreadTaskRunnerHandle::Get();
+ if (helper_thread_)
alexst (slow to review) 2015/01/22 23:09:24 So it occurred to me, we shouldn't be passing the
dnicoara 2015/01/23 17:13:06 Done. I've moved the helper thread in here and In
+ helper_thread_->Initialize();
}
// This code is meant to be very temporary and only as a special case to fix
@@ -148,6 +153,7 @@ class DriGpuPlatformSupportMessageFilter : public IPC::MessageFilter {
}
DriWindowDelegateManager* window_manager_;
+ DriHelperThread* helper_thread_;
IPC::Listener* main_thread_listener_;
scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_;
scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner_;
@@ -166,13 +172,15 @@ DriGpuPlatformSupport::DriGpuPlatformSupport(
DriWrapper* drm,
DriWindowDelegateManager* window_manager,
ScreenManager* screen_manager,
+ DriHelperThread* helper_thread,
scoped_ptr<NativeDisplayDelegateDri> ndd)
: sender_(NULL),
drm_(drm),
window_manager_(window_manager),
screen_manager_(screen_manager),
ndd_(ndd.Pass()) {
- filter_ = new DriGpuPlatformSupportMessageFilter(window_manager, this);
+ filter_ = new DriGpuPlatformSupportMessageFilter(window_manager,
+ helper_thread, this);
}
DriGpuPlatformSupport::~DriGpuPlatformSupport() {
« no previous file with comments | « ui/ozone/platform/dri/dri_gpu_platform_support.h ('k') | ui/ozone/platform/dri/dri_helper_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698