| OLD | NEW |
| 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 1115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1126 DCHECK_IMPLIES(IsZeroCopyUploadEnabled(), !IsOneCopyUploadEnabled()); | 1126 DCHECK_IMPLIES(IsZeroCopyUploadEnabled(), !IsOneCopyUploadEnabled()); |
| 1127 DCHECK_IMPLIES(IsOneCopyUploadEnabled(), !IsZeroCopyUploadEnabled()); | 1127 DCHECK_IMPLIES(IsOneCopyUploadEnabled(), !IsZeroCopyUploadEnabled()); |
| 1128 if (IsZeroCopyUploadEnabled()) | 1128 if (IsZeroCopyUploadEnabled()) |
| 1129 command_line->AppendSwitch(switches::kEnableZeroCopy); | 1129 command_line->AppendSwitch(switches::kEnableZeroCopy); |
| 1130 if (!IsOneCopyUploadEnabled()) | 1130 if (!IsOneCopyUploadEnabled()) |
| 1131 command_line->AppendSwitch(switches::kDisableOneCopy); | 1131 command_line->AppendSwitch(switches::kDisableOneCopy); |
| 1132 | 1132 |
| 1133 if (IsForceGpuRasterizationEnabled()) | 1133 if (IsForceGpuRasterizationEnabled()) |
| 1134 command_line->AppendSwitch(switches::kForceGpuRasterization); | 1134 command_line->AppendSwitch(switches::kForceGpuRasterization); |
| 1135 | 1135 |
| 1136 // TODO(reveman): We currently assume that the compositor will use BGRA_8888 | |
| 1137 // if it's able to, and RGBA_8888 otherwise. Since we don't know what it will | |
| 1138 // use we hardcode BGRA_8888 here for now. We should instead | |
| 1139 // move decisions about GpuMemoryBuffer format to the browser embedder so we | |
| 1140 // know it here, and pass that decision to the compositor for each usage. | |
| 1141 // crbug.com/490362 | |
| 1142 gfx::GpuMemoryBuffer::Format format = gfx::GpuMemoryBuffer::BGRA_8888; | |
| 1143 | |
| 1144 // TODO(danakj): When one-copy uploads support partial update, change this | |
| 1145 // usage to PERSISTENT_MAP for one-copy. | |
| 1146 gfx::GpuMemoryBuffer::Usage usage = gfx::GpuMemoryBuffer::MAP; | |
| 1147 | |
| 1148 command_line->AppendSwitchASCII( | 1136 command_line->AppendSwitchASCII( |
| 1149 switches::kUseImageTextureTarget, | 1137 switches::kUseImageTextureTarget, |
| 1150 base::UintToString( | 1138 base::UintToString( |
| 1151 BrowserGpuChannelHostFactory::GetImageTextureTarget(format, usage))); | 1139 BrowserGpuChannelHostFactory::GetImageTextureTarget())); |
| 1152 | 1140 |
| 1153 // Appending disable-gpu-feature switches due to software rendering list. | 1141 // Appending disable-gpu-feature switches due to software rendering list. |
| 1154 GpuDataManagerImpl* gpu_data_manager = GpuDataManagerImpl::GetInstance(); | 1142 GpuDataManagerImpl* gpu_data_manager = GpuDataManagerImpl::GetInstance(); |
| 1155 DCHECK(gpu_data_manager); | 1143 DCHECK(gpu_data_manager); |
| 1156 gpu_data_manager->AppendRendererCommandLine(command_line); | 1144 gpu_data_manager->AppendRendererCommandLine(command_line); |
| 1157 } | 1145 } |
| 1158 | 1146 |
| 1159 void RenderProcessHostImpl::AppendRendererCommandLine( | 1147 void RenderProcessHostImpl::AppendRendererCommandLine( |
| 1160 base::CommandLine* command_line) const { | 1148 base::CommandLine* command_line) const { |
| 1161 // Pass the process type first, so it shows first in process listings. | 1149 // Pass the process type first, so it shows first in process listings. |
| (...skipping 1309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2471 void RenderProcessHostImpl::GetAudioOutputControllers( | 2459 void RenderProcessHostImpl::GetAudioOutputControllers( |
| 2472 const GetAudioOutputControllersCallback& callback) const { | 2460 const GetAudioOutputControllersCallback& callback) const { |
| 2473 audio_renderer_host()->GetOutputControllers(callback); | 2461 audio_renderer_host()->GetOutputControllers(callback); |
| 2474 } | 2462 } |
| 2475 | 2463 |
| 2476 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() { | 2464 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() { |
| 2477 return bluetooth_dispatcher_host_.get(); | 2465 return bluetooth_dispatcher_host_.get(); |
| 2478 } | 2466 } |
| 2479 | 2467 |
| 2480 } // namespace content | 2468 } // namespace content |
| OLD | NEW |