OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/ozone/platform/dri/dri_gpu_platform_support.h" | 5 #include "ui/ozone/platform/dri/dri_gpu_platform_support.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/thread_task_runner_handle.h" | 8 #include "base/thread_task_runner_handle.h" |
9 #include "ipc/ipc_message_macros.h" | 9 #include "ipc/ipc_message_macros.h" |
10 #include "ui/ozone/common/gpu/ozone_gpu_message_params.h" | 10 #include "ui/ozone/common/gpu/ozone_gpu_message_params.h" |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 if (!handled) | 222 if (!handled) |
223 for (size_t i = 0; i < handlers_.size(); ++i) | 223 for (size_t i = 0; i < handlers_.size(); ++i) |
224 if (handlers_[i]->OnMessageReceived(message)) | 224 if (handlers_[i]->OnMessageReceived(message)) |
225 return true; | 225 return true; |
226 | 226 |
227 return false; | 227 return false; |
228 } | 228 } |
229 | 229 |
230 void DriGpuPlatformSupport::OnCreateWindowDelegate( | 230 void DriGpuPlatformSupport::OnCreateWindowDelegate( |
231 gfx::AcceleratedWidget widget) { | 231 gfx::AcceleratedWidget widget) { |
232 scoped_ptr<DriWindowDelegate> delegate(new DriWindowDelegateImpl( | 232 scoped_ptr<DriWindowDelegate> delegate( |
233 widget, drm_device_manager_, window_manager_, screen_manager_)); | 233 new DriWindowDelegateImpl(widget, drm_device_manager_, screen_manager_)); |
234 delegate->Initialize(); | 234 delegate->Initialize(); |
235 window_manager_->AddWindowDelegate(widget, delegate.Pass()); | 235 window_manager_->AddWindowDelegate(widget, delegate.Pass()); |
236 } | 236 } |
237 | 237 |
238 void DriGpuPlatformSupport::OnDestroyWindowDelegate( | 238 void DriGpuPlatformSupport::OnDestroyWindowDelegate( |
239 gfx::AcceleratedWidget widget) { | 239 gfx::AcceleratedWidget widget) { |
240 scoped_ptr<DriWindowDelegate> delegate = | 240 scoped_ptr<DriWindowDelegate> delegate = |
241 window_manager_->RemoveWindowDelegate(widget); | 241 window_manager_->RemoveWindowDelegate(widget); |
242 delegate->Shutdown(); | 242 delegate->Shutdown(); |
243 } | 243 } |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 void DriGpuPlatformSupport::SetIOTaskRunner( | 305 void DriGpuPlatformSupport::SetIOTaskRunner( |
306 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner) { | 306 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner) { |
307 ndd_->InitializeIOTaskRunner(io_task_runner); | 307 ndd_->InitializeIOTaskRunner(io_task_runner); |
308 } | 308 } |
309 | 309 |
310 IPC::MessageFilter* DriGpuPlatformSupport::GetMessageFilter() { | 310 IPC::MessageFilter* DriGpuPlatformSupport::GetMessageFilter() { |
311 return filter_.get(); | 311 return filter_.get(); |
312 } | 312 } |
313 | 313 |
314 } // namespace ui | 314 } // namespace ui |
OLD | NEW |