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

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

Issue 1139903005: Add PERSISTENT_MAP usage for GpuMemoryBuffers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: persistentmap: rebase 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 (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 1119 matching lines...) Expand 10 before | Expand all | Expand 10 after
1130 DCHECK_IMPLIES(IsZeroCopyUploadEnabled(), !IsOneCopyUploadEnabled()); 1130 DCHECK_IMPLIES(IsZeroCopyUploadEnabled(), !IsOneCopyUploadEnabled());
1131 DCHECK_IMPLIES(IsOneCopyUploadEnabled(), !IsZeroCopyUploadEnabled()); 1131 DCHECK_IMPLIES(IsOneCopyUploadEnabled(), !IsZeroCopyUploadEnabled());
1132 if (IsZeroCopyUploadEnabled()) 1132 if (IsZeroCopyUploadEnabled())
1133 command_line->AppendSwitch(switches::kEnableZeroCopy); 1133 command_line->AppendSwitch(switches::kEnableZeroCopy);
1134 if (!IsOneCopyUploadEnabled()) 1134 if (!IsOneCopyUploadEnabled())
1135 command_line->AppendSwitch(switches::kDisableOneCopy); 1135 command_line->AppendSwitch(switches::kDisableOneCopy);
1136 1136
1137 if (IsForceGpuRasterizationEnabled()) 1137 if (IsForceGpuRasterizationEnabled())
1138 command_line->AppendSwitch(switches::kForceGpuRasterization); 1138 command_line->AppendSwitch(switches::kForceGpuRasterization);
1139 1139
1140 // TODO(reveman): We currently assume that the compositor will use BGRA_8888
1141 // if it's able to, and RGBA_8888 otherwise. Since we don't know what it will
1142 // use we hardcode BGRA_8888 here for now. We should instead
1143 // move decisions about GpuMemoryBuffer format to the browser embedder so we
1144 // know it here, and pass that decision to the compositor for each usage.
1145 // crbug.com/490362
1146 gfx::GpuMemoryBuffer::Format format = gfx::GpuMemoryBuffer::BGRA_8888;
1147
1148 // TODO(danakj): When one-copy uploads support partial update, change this
1149 // usage to PERSISTENT_MAP for one-copy.
1150 gfx::GpuMemoryBuffer::Usage usage = gfx::GpuMemoryBuffer::MAP;
1151
1140 command_line->AppendSwitchASCII( 1152 command_line->AppendSwitchASCII(
1141 switches::kUseImageTextureTarget, 1153 switches::kUseImageTextureTarget,
1142 base::UintToString( 1154 base::UintToString(
1143 BrowserGpuChannelHostFactory::GetImageTextureTarget())); 1155 BrowserGpuChannelHostFactory::GetImageTextureTarget(format, usage)));
1144 1156
1145 // Appending disable-gpu-feature switches due to software rendering list. 1157 // Appending disable-gpu-feature switches due to software rendering list.
1146 GpuDataManagerImpl* gpu_data_manager = GpuDataManagerImpl::GetInstance(); 1158 GpuDataManagerImpl* gpu_data_manager = GpuDataManagerImpl::GetInstance();
1147 DCHECK(gpu_data_manager); 1159 DCHECK(gpu_data_manager);
1148 gpu_data_manager->AppendRendererCommandLine(command_line); 1160 gpu_data_manager->AppendRendererCommandLine(command_line);
1149 } 1161 }
1150 1162
1151 void RenderProcessHostImpl::AppendRendererCommandLine( 1163 void RenderProcessHostImpl::AppendRendererCommandLine(
1152 base::CommandLine* command_line) const { 1164 base::CommandLine* command_line) const {
1153 // Pass the process type first, so it shows first in process listings. 1165 // Pass the process type first, so it shows first in process listings.
(...skipping 1311 matching lines...) Expand 10 before | Expand all | Expand 10 after
2465 void RenderProcessHostImpl::GetAudioOutputControllers( 2477 void RenderProcessHostImpl::GetAudioOutputControllers(
2466 const GetAudioOutputControllersCallback& callback) const { 2478 const GetAudioOutputControllersCallback& callback) const {
2467 audio_renderer_host()->GetOutputControllers(callback); 2479 audio_renderer_host()->GetOutputControllers(callback);
2468 } 2480 }
2469 2481
2470 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() { 2482 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() {
2471 return bluetooth_dispatcher_host_.get(); 2483 return bluetooth_dispatcher_host_.get();
2472 } 2484 }
2473 2485
2474 } // namespace content 2486 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/gpu/browser_gpu_memory_buffer_manager.cc ('k') | content/common/child_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698