OLD | NEW |
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 1131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1142 switches::kContentImageTextureTarget, | 1142 switches::kContentImageTextureTarget, |
1143 base::UintToString( | 1143 base::UintToString( |
1144 // TODO(reveman): We currently assume that the compositor will use | 1144 // TODO(reveman): We currently assume that the compositor will use |
1145 // BGRA_8888 if it's able to, and RGBA_8888 otherwise. Since we don't | 1145 // BGRA_8888 if it's able to, and RGBA_8888 otherwise. Since we don't |
1146 // know what it will use we hardcode BGRA_8888 here for now. We should | 1146 // know what it will use we hardcode BGRA_8888 here for now. We should |
1147 // instead move decisions about GpuMemoryBuffer format to the browser | 1147 // instead move decisions about GpuMemoryBuffer format to the browser |
1148 // embedder so we know it here, and pass that decision to the | 1148 // embedder so we know it here, and pass that decision to the |
1149 // compositor for each usage. | 1149 // compositor for each usage. |
1150 // crbug.com/490362 | 1150 // crbug.com/490362 |
1151 BrowserGpuMemoryBufferManager::GetImageTextureTarget( | 1151 BrowserGpuMemoryBufferManager::GetImageTextureTarget( |
1152 gfx::GpuMemoryBuffer::BGRA_8888, | 1152 gfx::BufferFormat::BGRA_8888, |
1153 // TODO(danakj): When one-copy supports partial update, change | 1153 // TODO(danakj): When one-copy supports partial update, change |
1154 // this usage to PERSISTENT_MAP for one-copy. | 1154 // this usage to PERSISTENT_MAP for one-copy. |
1155 gfx::GpuMemoryBuffer::MAP))); | 1155 gfx::BufferUsage::MAP))); |
1156 | 1156 |
1157 command_line->AppendSwitchASCII( | 1157 command_line->AppendSwitchASCII( |
1158 switches::kVideoImageTextureTarget, | 1158 switches::kVideoImageTextureTarget, |
1159 base::UintToString(BrowserGpuMemoryBufferManager::GetImageTextureTarget( | 1159 base::UintToString(BrowserGpuMemoryBufferManager::GetImageTextureTarget( |
1160 gfx::GpuMemoryBuffer::R_8, gfx::GpuMemoryBuffer::MAP))); | 1160 gfx::BufferFormat::R_8, gfx::BufferUsage::MAP))); |
1161 | 1161 |
1162 // Appending disable-gpu-feature switches due to software rendering list. | 1162 // Appending disable-gpu-feature switches due to software rendering list. |
1163 GpuDataManagerImpl* gpu_data_manager = GpuDataManagerImpl::GetInstance(); | 1163 GpuDataManagerImpl* gpu_data_manager = GpuDataManagerImpl::GetInstance(); |
1164 DCHECK(gpu_data_manager); | 1164 DCHECK(gpu_data_manager); |
1165 gpu_data_manager->AppendRendererCommandLine(command_line); | 1165 gpu_data_manager->AppendRendererCommandLine(command_line); |
1166 } | 1166 } |
1167 | 1167 |
1168 void RenderProcessHostImpl::AppendRendererCommandLine( | 1168 void RenderProcessHostImpl::AppendRendererCommandLine( |
1169 base::CommandLine* command_line) const { | 1169 base::CommandLine* command_line) const { |
1170 // Pass the process type first, so it shows first in process listings. | 1170 // Pass the process type first, so it shows first in process listings. |
(...skipping 1340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2511 void RenderProcessHostImpl::GetAudioOutputControllers( | 2511 void RenderProcessHostImpl::GetAudioOutputControllers( |
2512 const GetAudioOutputControllersCallback& callback) const { | 2512 const GetAudioOutputControllersCallback& callback) const { |
2513 audio_renderer_host()->GetOutputControllers(callback); | 2513 audio_renderer_host()->GetOutputControllers(callback); |
2514 } | 2514 } |
2515 | 2515 |
2516 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() { | 2516 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() { |
2517 return bluetooth_dispatcher_host_.get(); | 2517 return bluetooth_dispatcher_host_.get(); |
2518 } | 2518 } |
2519 | 2519 |
2520 } // namespace content | 2520 } // namespace content |
OLD | NEW |