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

Side by Side Diff: content/browser/gpu/browser_gpu_channel_host_factory.cc

Issue 211133005: [WIP] Not for review. Zero copy. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/browser/gpu/browser_gpu_channel_host_factory.h" 5 #include "content/browser/gpu/browser_gpu_channel_host_factory.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/synchronization/waitable_event.h" 9 #include "base/synchronization/waitable_event.h"
10 #include "base/threading/thread_restrictions.h" 10 #include "base/threading/thread_restrictions.h"
11 #include "content/browser/gpu/gpu_data_manager_impl.h" 11 #include "content/browser/gpu/gpu_data_manager_impl.h"
12 #include "content/browser/gpu/gpu_process_host.h" 12 #include "content/browser/gpu/gpu_process_host.h"
13 #include "content/browser/gpu/gpu_surface_tracker.h" 13 #include "content/browser/gpu/gpu_surface_tracker.h"
14 #include "content/common/child_process_host_impl.h" 14 #include "content/common/child_process_host_impl.h"
15 #include "content/common/gpu/client/gpu_memory_buffer_impl.h" 15 #include "content/common/gpu/client/gpu_memory_buffer_impl.h"
16 #include "content/common/gpu/gpu_messages.h" 16 #include "content/common/gpu/gpu_messages.h"
17 #include "content/public/browser/browser_thread.h" 17 #include "content/public/browser/browser_thread.h"
18 #include "content/public/browser/gpu_data_manager.h" 18 #include "content/public/browser/gpu_data_manager.h"
19 #include "content/public/common/content_client.h" 19 #include "content/public/common/content_client.h"
20 #include "ipc/ipc_channel_handle.h" 20 #include "ipc/ipc_channel_handle.h"
21 #include "ipc/ipc_forwarding_message_filter.h" 21 #include "ipc/ipc_forwarding_message_filter.h"
22 #include "ipc/message_filter.h" 22 #include "ipc/message_filter.h"
23 23
24 #if defined(OS_LINUX)
25 #include "content/common/gpu/client/gpu_memory_buffer_impl_intel_drm.h"
26 #include "ui/gl/gl_implementation.h"
27 #endif
28
24 namespace content { 29 namespace content {
25 30
26 BrowserGpuChannelHostFactory* BrowserGpuChannelHostFactory::instance_ = NULL; 31 BrowserGpuChannelHostFactory* BrowserGpuChannelHostFactory::instance_ = NULL;
27 32
28 struct BrowserGpuChannelHostFactory::CreateRequest { 33 struct BrowserGpuChannelHostFactory::CreateRequest {
29 CreateRequest() 34 CreateRequest()
30 : event(true, false), gpu_host_id(0), route_id(MSG_ROUTING_NONE) {} 35 : event(true, false), gpu_host_id(0), route_id(MSG_ROUTING_NONE) {}
31 ~CreateRequest() {} 36 ~CreateRequest() {}
32 base::WaitableEvent event; 37 base::WaitableEvent event;
33 int gpu_host_id; 38 int gpu_host_id;
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 filter->AddRoute(MSG_ROUTING_CONTROL, handler); 468 filter->AddRoute(MSG_ROUTING_CONTROL, handler);
464 469
465 GetIOLoopProxy()->PostTask( 470 GetIOLoopProxy()->PostTask(
466 FROM_HERE, 471 FROM_HERE,
467 base::Bind(&BrowserGpuChannelHostFactory::AddFilterOnIO, 472 base::Bind(&BrowserGpuChannelHostFactory::AddFilterOnIO,
468 gpu_host_id_, 473 gpu_host_id_,
469 filter)); 474 filter));
470 } 475 }
471 476
472 } // namespace content 477 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698