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

Side by Side Diff: content/common/gpu/client/gpu_channel_host.cc

Issue 656263003: cc: Move GpuMemoryBufferManager interface to gpu namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gn build fix Created 6 years, 1 month 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/common/gpu/client/gpu_channel_host.h" 5 #include "content/common/gpu/client/gpu_channel_host.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 18 matching lines...) Expand all
29 GpuListenerInfo::GpuListenerInfo() {} 29 GpuListenerInfo::GpuListenerInfo() {}
30 30
31 GpuListenerInfo::~GpuListenerInfo() {} 31 GpuListenerInfo::~GpuListenerInfo() {}
32 32
33 // static 33 // static
34 scoped_refptr<GpuChannelHost> GpuChannelHost::Create( 34 scoped_refptr<GpuChannelHost> GpuChannelHost::Create(
35 GpuChannelHostFactory* factory, 35 GpuChannelHostFactory* factory,
36 const gpu::GPUInfo& gpu_info, 36 const gpu::GPUInfo& gpu_info,
37 const IPC::ChannelHandle& channel_handle, 37 const IPC::ChannelHandle& channel_handle,
38 base::WaitableEvent* shutdown_event, 38 base::WaitableEvent* shutdown_event,
39 cc::GpuMemoryBufferManager* gpu_memory_buffer_manager) { 39 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager) {
40 DCHECK(factory->IsMainThread()); 40 DCHECK(factory->IsMainThread());
41 scoped_refptr<GpuChannelHost> host = 41 scoped_refptr<GpuChannelHost> host =
42 new GpuChannelHost(factory, gpu_info, gpu_memory_buffer_manager); 42 new GpuChannelHost(factory, gpu_info, gpu_memory_buffer_manager);
43 host->Connect(channel_handle, shutdown_event); 43 host->Connect(channel_handle, shutdown_event);
44 return host; 44 return host;
45 } 45 }
46 46
47 GpuChannelHost::GpuChannelHost( 47 GpuChannelHost::GpuChannelHost(
48 GpuChannelHostFactory* factory, 48 GpuChannelHostFactory* factory,
49 const gpu::GPUInfo& gpu_info, 49 const gpu::GPUInfo& gpu_info,
50 cc::GpuMemoryBufferManager* gpu_memory_buffer_manager) 50 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager)
51 : factory_(factory), 51 : factory_(factory),
52 gpu_info_(gpu_info), 52 gpu_info_(gpu_info),
53 gpu_memory_buffer_manager_(gpu_memory_buffer_manager) { 53 gpu_memory_buffer_manager_(gpu_memory_buffer_manager) {
54 next_transfer_buffer_id_.GetNext(); 54 next_transfer_buffer_id_.GetNext();
55 next_image_id_.GetNext(); 55 next_image_id_.GetNext();
56 next_route_id_.GetNext(); 56 next_route_id_.GetNext();
57 } 57 }
58 58
59 void GpuChannelHost::Connect(const IPC::ChannelHandle& channel_handle, 59 void GpuChannelHost::Connect(const IPC::ChannelHandle& channel_handle,
60 base::WaitableEvent* shutdown_event) { 60 base::WaitableEvent* shutdown_event) {
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 391
392 listeners_.clear(); 392 listeners_.clear();
393 } 393 }
394 394
395 bool GpuChannelHost::MessageFilter::IsLost() const { 395 bool GpuChannelHost::MessageFilter::IsLost() const {
396 AutoLock lock(lock_); 396 AutoLock lock(lock_);
397 return lost_; 397 return lost_;
398 } 398 }
399 399
400 } // namespace content 400 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/client/gpu_channel_host.h ('k') | content/renderer/gpu/render_widget_compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698