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

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: more ifdefs 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
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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 #include "content/browser/browser_plugin/browser_plugin_message_filter.h" 48 #include "content/browser/browser_plugin/browser_plugin_message_filter.h"
49 #include "content/browser/child_process_security_policy_impl.h" 49 #include "content/browser/child_process_security_policy_impl.h"
50 #include "content/browser/device_sensors/device_motion_message_filter.h" 50 #include "content/browser/device_sensors/device_motion_message_filter.h"
51 #include "content/browser/device_sensors/device_orientation_message_filter.h" 51 #include "content/browser/device_sensors/device_orientation_message_filter.h"
52 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" 52 #include "content/browser/dom_storage/dom_storage_context_wrapper.h"
53 #include "content/browser/dom_storage/dom_storage_message_filter.h" 53 #include "content/browser/dom_storage/dom_storage_message_filter.h"
54 #include "content/browser/download/mhtml_generation_manager.h" 54 #include "content/browser/download/mhtml_generation_manager.h"
55 #include "content/browser/fileapi/chrome_blob_storage_context.h" 55 #include "content/browser/fileapi/chrome_blob_storage_context.h"
56 #include "content/browser/fileapi/fileapi_message_filter.h" 56 #include "content/browser/fileapi/fileapi_message_filter.h"
57 #include "content/browser/frame_host/render_frame_message_filter.h" 57 #include "content/browser/frame_host/render_frame_message_filter.h"
58 #include "content/browser/gpu/browser_gpu_channel_host_factory.h"
58 #include "content/browser/gpu/compositor_util.h" 59 #include "content/browser/gpu/compositor_util.h"
59 #include "content/browser/gpu/gpu_data_manager_impl.h" 60 #include "content/browser/gpu/gpu_data_manager_impl.h"
60 #include "content/browser/gpu/gpu_process_host.h" 61 #include "content/browser/gpu/gpu_process_host.h"
61 #include "content/browser/gpu/shader_disk_cache.h" 62 #include "content/browser/gpu/shader_disk_cache.h"
62 #include "content/browser/histogram_message_filter.h" 63 #include "content/browser/histogram_message_filter.h"
63 #include "content/browser/indexed_db/indexed_db_context_impl.h" 64 #include "content/browser/indexed_db/indexed_db_context_impl.h"
64 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h" 65 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h"
65 #include "content/browser/loader/resource_message_filter.h" 66 #include "content/browser/loader/resource_message_filter.h"
66 #include "content/browser/loader/resource_scheduler_filter.h" 67 #include "content/browser/loader/resource_scheduler_filter.h"
67 #include "content/browser/media/capture/audio_mirroring_manager.h" 68 #include "content/browser/media/capture/audio_mirroring_manager.h"
(...skipping 2255 matching lines...) Expand 10 before | Expand all | Expand 10 after
2323 return; 2324 return;
2324 } 2325 }
2325 } 2326 }
2326 #endif 2327 #endif
2327 2328
2328 GpuMemoryBufferImpl::AllocateForChildProcess( 2329 GpuMemoryBufferImpl::AllocateForChildProcess(
2329 gfx::Size(width, height), 2330 gfx::Size(width, height),
2330 internalformat, 2331 internalformat,
2331 usage, 2332 usage,
2332 GetHandle(), 2333 GetHandle(),
2334 GetID(),
2335 BrowserGpuChannelHostFactory::instance(),
2333 base::Bind(&RenderProcessHostImpl::GpuMemoryBufferAllocated, 2336 base::Bind(&RenderProcessHostImpl::GpuMemoryBufferAllocated,
2334 weak_factory_.GetWeakPtr(), 2337 weak_factory_.GetWeakPtr(),
2335 reply)); 2338 reply));
2336 } 2339 }
2337 2340
2338 void RenderProcessHostImpl::GpuMemoryBufferAllocated( 2341 void RenderProcessHostImpl::GpuMemoryBufferAllocated(
2339 IPC::Message* reply, 2342 IPC::Message* reply,
2340 const gfx::GpuMemoryBufferHandle& handle) { 2343 const gfx::GpuMemoryBufferHandle& handle) {
2341 DCHECK_CURRENTLY_ON(BrowserThread::UI); 2344 DCHECK_CURRENTLY_ON(BrowserThread::UI);
2342 ChildProcessHostMsg_SyncAllocateGpuMemoryBuffer::WriteReplyParams(reply, 2345 ChildProcessHostMsg_SyncAllocateGpuMemoryBuffer::WriteReplyParams(reply,
2343 handle); 2346 handle);
2344 Send(reply); 2347 Send(reply);
2345 } 2348 }
2346 2349
2347 void RenderProcessHostImpl::OnDeletedGpuMemoryBuffer( 2350 void RenderProcessHostImpl::OnDeletedGpuMemoryBuffer(
2348 gfx::GpuMemoryBufferType type, 2351 gfx::GpuMemoryBufferType type,
2349 const gfx::GpuMemoryBufferId& id) { 2352 const gfx::GpuMemoryBufferId& id) {
2350 DCHECK_CURRENTLY_ON(BrowserThread::UI); 2353 DCHECK_CURRENTLY_ON(BrowserThread::UI);
2351 GpuMemoryBufferImpl::DeletedByChildProcess(type, id, GetHandle()); 2354 GpuMemoryBufferImpl::DeletedByChildProcess(type, id, GetHandle());
2352 } 2355 }
2353 2356
2354 } // namespace content 2357 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/common/gpu/client/gpu_channel_host.cc » ('j') | content/common/gpu/client/gpu_channel_host.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698