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

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

Issue 458313002: Browser side OZONE_NATIVE_BUFFER allocation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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
« no previous file with comments | « no previous file | content/common/gpu/client/gpu_channel_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2312 matching lines...) Expand 10 before | Expand all | Expand 10 after
2323 return; 2323 return;
2324 } 2324 }
2325 } 2325 }
2326 #endif 2326 #endif
2327 2327
2328 GpuMemoryBufferImpl::AllocateForChildProcess( 2328 GpuMemoryBufferImpl::AllocateForChildProcess(
2329 gfx::Size(width, height), 2329 gfx::Size(width, height),
2330 internalformat, 2330 internalformat,
2331 usage, 2331 usage,
2332 GetHandle(), 2332 GetHandle(),
2333 GetID(),
2333 base::Bind(&RenderProcessHostImpl::GpuMemoryBufferAllocated, 2334 base::Bind(&RenderProcessHostImpl::GpuMemoryBufferAllocated,
2334 weak_factory_.GetWeakPtr(), 2335 weak_factory_.GetWeakPtr(),
2335 reply)); 2336 reply));
2336 } 2337 }
2337 2338
2338 void RenderProcessHostImpl::GpuMemoryBufferAllocated( 2339 void RenderProcessHostImpl::GpuMemoryBufferAllocated(
2339 IPC::Message* reply, 2340 IPC::Message* reply,
2340 const gfx::GpuMemoryBufferHandle& handle) { 2341 const gfx::GpuMemoryBufferHandle& handle) {
2341 DCHECK_CURRENTLY_ON(BrowserThread::UI); 2342 DCHECK_CURRENTLY_ON(BrowserThread::UI);
2342 ChildProcessHostMsg_SyncAllocateGpuMemoryBuffer::WriteReplyParams(reply, 2343 ChildProcessHostMsg_SyncAllocateGpuMemoryBuffer::WriteReplyParams(reply,
2343 handle); 2344 handle);
2344 Send(reply); 2345 Send(reply);
2345 } 2346 }
2346 2347
2347 void RenderProcessHostImpl::OnDeletedGpuMemoryBuffer( 2348 void RenderProcessHostImpl::OnDeletedGpuMemoryBuffer(
2348 gfx::GpuMemoryBufferType type, 2349 gfx::GpuMemoryBufferType type,
2349 const gfx::GpuMemoryBufferId& id) { 2350 const gfx::GpuMemoryBufferId& id) {
2350 DCHECK_CURRENTLY_ON(BrowserThread::UI); 2351 DCHECK_CURRENTLY_ON(BrowserThread::UI);
2351 GpuMemoryBufferImpl::DeletedByChildProcess(type, id, GetHandle()); 2352 GpuMemoryBufferImpl::DeletedByChildProcess(type, id, GetHandle());
2352 } 2353 }
2353 2354
2354 } // namespace content 2355 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/common/gpu/client/gpu_channel_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698