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

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

Issue 2810593003: gpu: Some cleanups. (Closed)
Patch Set: . Created 3 years, 8 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/gpu_client.h" 5 #include "content/browser/gpu/gpu_client.h"
6 6
7 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" 7 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h"
8 #include "content/browser/gpu/gpu_process_host.h" 8 #include "content/browser/gpu/gpu_process_host.h"
9 #include "content/common/child_process_host_impl.h" 9 #include "content/common/child_process_host_impl.h"
10 #include "content/public/browser/browser_thread.h" 10 #include "content/public/browser/browser_thread.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 } 49 }
50 50
51 void GpuClient::OnCreateGpuMemoryBuffer( 51 void GpuClient::OnCreateGpuMemoryBuffer(
52 const CreateGpuMemoryBufferCallback& callback, 52 const CreateGpuMemoryBufferCallback& callback,
53 const gfx::GpuMemoryBufferHandle& handle) { 53 const gfx::GpuMemoryBufferHandle& handle) {
54 callback.Run(handle); 54 callback.Run(handle);
55 } 55 }
56 56
57 void GpuClient::EstablishGpuChannel( 57 void GpuClient::EstablishGpuChannel(
58 const EstablishGpuChannelCallback& callback) { 58 const EstablishGpuChannelCallback& callback) {
59 GpuProcessHost* host = 59 GpuProcessHost* host = GpuProcessHost::Get();
60 GpuProcessHost::Get(GpuProcessHost::GPU_PROCESS_KIND_SANDBOXED);
61 if (!host) { 60 if (!host) {
62 OnEstablishGpuChannel( 61 OnEstablishGpuChannel(
63 callback, IPC::ChannelHandle(), gpu::GPUInfo(), 62 callback, IPC::ChannelHandle(), gpu::GPUInfo(),
64 GpuProcessHost::EstablishChannelStatus::GPU_ACCESS_DENIED); 63 GpuProcessHost::EstablishChannelStatus::GPU_ACCESS_DENIED);
65 return; 64 return;
66 } 65 }
67 66
68 bool preempts = false; 67 bool preempts = false;
69 bool allow_view_command_buffers = false; 68 bool allow_view_command_buffers = false;
70 bool allow_real_time_streams = false; 69 bool allow_real_time_streams = false;
(...skipping 30 matching lines...) Expand all
101 100
102 void GpuClient::DestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id, 101 void GpuClient::DestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id,
103 const gpu::SyncToken& sync_token) { 102 const gpu::SyncToken& sync_token) {
104 DCHECK(BrowserGpuMemoryBufferManager::current()); 103 DCHECK(BrowserGpuMemoryBufferManager::current());
105 104
106 BrowserGpuMemoryBufferManager::current()->ChildProcessDeletedGpuMemoryBuffer( 105 BrowserGpuMemoryBufferManager::current()->ChildProcessDeletedGpuMemoryBuffer(
107 id, render_process_id_, sync_token); 106 id, render_process_id_, sync_token);
108 } 107 }
109 108
110 } // namespace content 109 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/gpu/browser_gpu_memory_buffer_manager.cc ('k') | content/browser/gpu/gpu_data_manager_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698