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

Side by Side Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 302603004: Plumb GpuMemoryBuffer allocation to GPU process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments 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 // Represents the browser side of the browser <--> renderer communication 5 // Represents the browser side of the browser <--> renderer communication
6 // channel. There will be one RenderProcessHost per renderer process. 6 // channel. There will be one RenderProcessHost per renderer process.
7 7
8 #include "content/browser/renderer_host/render_process_host_impl.h" 8 #include "content/browser/renderer_host/render_process_host_impl.h"
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 2222 matching lines...) Expand 10 before | Expand all | Expand 10 after
2233 return; 2233 return;
2234 } 2234 }
2235 } 2235 }
2236 #endif 2236 #endif
2237 2237
2238 GpuMemoryBufferImpl::AllocateForChildProcess( 2238 GpuMemoryBufferImpl::AllocateForChildProcess(
2239 gfx::Size(width, height), 2239 gfx::Size(width, height),
2240 internalformat, 2240 internalformat,
2241 usage, 2241 usage,
2242 GetHandle(), 2242 GetHandle(),
2243 GetID(),
2243 base::Bind(&RenderProcessHostImpl::GpuMemoryBufferAllocated, 2244 base::Bind(&RenderProcessHostImpl::GpuMemoryBufferAllocated,
2244 weak_factory_.GetWeakPtr(), 2245 weak_factory_.GetWeakPtr(),
2245 reply)); 2246 reply));
2246 } 2247 }
2247 2248
2248 void RenderProcessHostImpl::GpuMemoryBufferAllocated( 2249 void RenderProcessHostImpl::GpuMemoryBufferAllocated(
2249 IPC::Message* reply, 2250 IPC::Message* reply,
2250 const gfx::GpuMemoryBufferHandle& handle) { 2251 const gfx::GpuMemoryBufferHandle& handle) {
2251 DCHECK_CURRENTLY_ON(BrowserThread::UI); 2252 DCHECK_CURRENTLY_ON(BrowserThread::UI);
2252 ChildProcessHostMsg_SyncAllocateGpuMemoryBuffer::WriteReplyParams(reply, 2253 ChildProcessHostMsg_SyncAllocateGpuMemoryBuffer::WriteReplyParams(reply,
2253 handle); 2254 handle);
2254 Send(reply); 2255 Send(reply);
2255 } 2256 }
2256 2257
2257 } // namespace content 2258 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698