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

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

Issue 1189943002: content: Fix lost context handling when using native GpuMemoryBuffers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: retry logic and remove singleton Created 5 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 #include "content/browser/device_sensors/device_light_message_filter.h" 53 #include "content/browser/device_sensors/device_light_message_filter.h"
54 #include "content/browser/device_sensors/device_motion_message_filter.h" 54 #include "content/browser/device_sensors/device_motion_message_filter.h"
55 #include "content/browser/device_sensors/device_orientation_message_filter.h" 55 #include "content/browser/device_sensors/device_orientation_message_filter.h"
56 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" 56 #include "content/browser/dom_storage/dom_storage_context_wrapper.h"
57 #include "content/browser/dom_storage/dom_storage_message_filter.h" 57 #include "content/browser/dom_storage/dom_storage_message_filter.h"
58 #include "content/browser/download/mhtml_generation_manager.h" 58 #include "content/browser/download/mhtml_generation_manager.h"
59 #include "content/browser/fileapi/chrome_blob_storage_context.h" 59 #include "content/browser/fileapi/chrome_blob_storage_context.h"
60 #include "content/browser/fileapi/fileapi_message_filter.h" 60 #include "content/browser/fileapi/fileapi_message_filter.h"
61 #include "content/browser/frame_host/render_frame_message_filter.h" 61 #include "content/browser/frame_host/render_frame_message_filter.h"
62 #include "content/browser/geofencing/geofencing_dispatcher_host.h" 62 #include "content/browser/geofencing/geofencing_dispatcher_host.h"
63 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" 63 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h"
64 #include "content/browser/gpu/compositor_util.h" 64 #include "content/browser/gpu/compositor_util.h"
65 #include "content/browser/gpu/gpu_data_manager_impl.h" 65 #include "content/browser/gpu/gpu_data_manager_impl.h"
66 #include "content/browser/gpu/gpu_process_host.h" 66 #include "content/browser/gpu/gpu_process_host.h"
67 #include "content/browser/gpu/shader_disk_cache.h" 67 #include "content/browser/gpu/shader_disk_cache.h"
68 #include "content/browser/histogram_message_filter.h" 68 #include "content/browser/histogram_message_filter.h"
69 #include "content/browser/indexed_db/indexed_db_context_impl.h" 69 #include "content/browser/indexed_db/indexed_db_context_impl.h"
70 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h" 70 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h"
71 #include "content/browser/loader/resource_message_filter.h" 71 #include "content/browser/loader/resource_message_filter.h"
72 #include "content/browser/loader/resource_scheduler_filter.h" 72 #include "content/browser/loader/resource_scheduler_filter.h"
73 #include "content/browser/media/capture/audio_mirroring_manager.h" 73 #include "content/browser/media/capture/audio_mirroring_manager.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 #include "content/browser/shared_worker/worker_storage_partition.h" 110 #include "content/browser/shared_worker/worker_storage_partition.h"
111 #include "content/browser/speech/speech_recognition_dispatcher_host.h" 111 #include "content/browser/speech/speech_recognition_dispatcher_host.h"
112 #include "content/browser/storage_partition_impl.h" 112 #include "content/browser/storage_partition_impl.h"
113 #include "content/browser/streams/stream_context.h" 113 #include "content/browser/streams/stream_context.h"
114 #include "content/browser/tracing/trace_message_filter.h" 114 #include "content/browser/tracing/trace_message_filter.h"
115 #include "content/browser/webui/web_ui_controller_factory_registry.h" 115 #include "content/browser/webui/web_ui_controller_factory_registry.h"
116 #include "content/common/child_process_host_impl.h" 116 #include "content/common/child_process_host_impl.h"
117 #include "content/common/child_process_messages.h" 117 #include "content/common/child_process_messages.h"
118 #include "content/common/content_switches_internal.h" 118 #include "content/common/content_switches_internal.h"
119 #include "content/common/frame_messages.h" 119 #include "content/common/frame_messages.h"
120 #include "content/common/gpu/gpu_memory_buffer_factory.h"
121 #include "content/common/gpu/gpu_messages.h" 120 #include "content/common/gpu/gpu_messages.h"
122 #include "content/common/in_process_child_thread_params.h" 121 #include "content/common/in_process_child_thread_params.h"
123 #include "content/common/mojo/channel_init.h" 122 #include "content/common/mojo/channel_init.h"
124 #include "content/common/mojo/mojo_messages.h" 123 #include "content/common/mojo/mojo_messages.h"
125 #include "content/common/resource_messages.h" 124 #include "content/common/resource_messages.h"
126 #include "content/common/view_messages.h" 125 #include "content/common/view_messages.h"
127 #include "content/public/browser/browser_context.h" 126 #include "content/public/browser/browser_context.h"
128 #include "content/public/browser/content_browser_client.h" 127 #include "content/public/browser/content_browser_client.h"
129 #include "content/public/browser/navigator_connect_context.h" 128 #include "content/public/browser/navigator_connect_context.h"
130 #include "content/public/browser/notification_service.h" 129 #include "content/public/browser/notification_service.h"
(...skipping 1008 matching lines...) Expand 10 before | Expand all | Expand 10 after
1139 command_line->AppendSwitchASCII( 1138 command_line->AppendSwitchASCII(
1140 switches::kContentImageTextureTarget, 1139 switches::kContentImageTextureTarget,
1141 base::UintToString( 1140 base::UintToString(
1142 // TODO(reveman): We currently assume that the compositor will use 1141 // TODO(reveman): We currently assume that the compositor will use
1143 // BGRA_8888 if it's able to, and RGBA_8888 otherwise. Since we don't 1142 // BGRA_8888 if it's able to, and RGBA_8888 otherwise. Since we don't
1144 // know what it will use we hardcode BGRA_8888 here for now. We should 1143 // know what it will use we hardcode BGRA_8888 here for now. We should
1145 // instead move decisions about GpuMemoryBuffer format to the browser 1144 // instead move decisions about GpuMemoryBuffer format to the browser
1146 // embedder so we know it here, and pass that decision to the 1145 // embedder so we know it here, and pass that decision to the
1147 // compositor for each usage. 1146 // compositor for each usage.
1148 // crbug.com/490362 1147 // crbug.com/490362
1149 BrowserGpuChannelHostFactory::GetImageTextureTarget( 1148 BrowserGpuMemoryBufferManager::GetImageTextureTarget(
1150 gfx::GpuMemoryBuffer::BGRA_8888, 1149 gfx::GpuMemoryBuffer::BGRA_8888,
1151 // TODO(danakj): When one-copy supports partial update, change 1150 // TODO(danakj): When one-copy supports partial update, change
1152 // this usage to PERSISTENT_MAP for one-copy. 1151 // this usage to PERSISTENT_MAP for one-copy.
1153 gfx::GpuMemoryBuffer::MAP))); 1152 gfx::GpuMemoryBuffer::MAP)));
1154 1153
1155 command_line->AppendSwitchASCII( 1154 command_line->AppendSwitchASCII(
1156 switches::kVideoImageTextureTarget, 1155 switches::kVideoImageTextureTarget,
1157 base::UintToString(BrowserGpuChannelHostFactory::GetImageTextureTarget( 1156 base::UintToString(BrowserGpuMemoryBufferManager::GetImageTextureTarget(
1158 gfx::GpuMemoryBuffer::R_8, gfx::GpuMemoryBuffer::MAP))); 1157 gfx::GpuMemoryBuffer::R_8, gfx::GpuMemoryBuffer::MAP)));
1159 1158
1160 // Appending disable-gpu-feature switches due to software rendering list. 1159 // Appending disable-gpu-feature switches due to software rendering list.
1161 GpuDataManagerImpl* gpu_data_manager = GpuDataManagerImpl::GetInstance(); 1160 GpuDataManagerImpl* gpu_data_manager = GpuDataManagerImpl::GetInstance();
1162 DCHECK(gpu_data_manager); 1161 DCHECK(gpu_data_manager);
1163 gpu_data_manager->AppendRendererCommandLine(command_line); 1162 gpu_data_manager->AppendRendererCommandLine(command_line);
1164 } 1163 }
1165 1164
1166 void RenderProcessHostImpl::AppendRendererCommandLine( 1165 void RenderProcessHostImpl::AppendRendererCommandLine(
1167 base::CommandLine* command_line) const { 1166 base::CommandLine* command_line) const {
(...skipping 1335 matching lines...) Expand 10 before | Expand all | Expand 10 after
2503 void RenderProcessHostImpl::GetAudioOutputControllers( 2502 void RenderProcessHostImpl::GetAudioOutputControllers(
2504 const GetAudioOutputControllersCallback& callback) const { 2503 const GetAudioOutputControllersCallback& callback) const {
2505 audio_renderer_host()->GetOutputControllers(callback); 2504 audio_renderer_host()->GetOutputControllers(callback);
2506 } 2505 }
2507 2506
2508 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() { 2507 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() {
2509 return bluetooth_dispatcher_host_.get(); 2508 return bluetooth_dispatcher_host_.get();
2510 } 2509 }
2511 2510
2512 } // namespace content 2511 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698