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

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

Issue 1381163002: Add a flag to disable partial raster in renderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: feedback + UT refactoring Created 5 years, 2 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
« no previous file with comments | « content/browser/gpu/compositor_util.cc ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after
1131 command_line->AppendSwitch(switches::kEnableGpuRasterization); 1131 command_line->AppendSwitch(switches::kEnableGpuRasterization);
1132 1132
1133 int msaa_sample_count = GpuRasterizationMSAASampleCount(); 1133 int msaa_sample_count = GpuRasterizationMSAASampleCount();
1134 if (msaa_sample_count >= 0) { 1134 if (msaa_sample_count >= 0) {
1135 command_line->AppendSwitchASCII(switches::kGpuRasterizationMSAASampleCount, 1135 command_line->AppendSwitchASCII(switches::kGpuRasterizationMSAASampleCount,
1136 base::IntToString(msaa_sample_count)); 1136 base::IntToString(msaa_sample_count));
1137 } 1137 }
1138 1138
1139 if (IsZeroCopyUploadEnabled()) 1139 if (IsZeroCopyUploadEnabled())
1140 command_line->AppendSwitch(switches::kEnableZeroCopy); 1140 command_line->AppendSwitch(switches::kEnableZeroCopy);
1141 if (IsPersistentGpuMemoryBufferEnabled()) 1141 if (IsPartialRasterEnabled())
1142 command_line->AppendSwitch(switches::kEnablePersistentGpuMemoryBuffer); 1142 command_line->AppendSwitch(switches::kEnablePartialRaster);
1143 1143
1144 if (IsForceGpuRasterizationEnabled()) 1144 if (IsForceGpuRasterizationEnabled())
1145 command_line->AppendSwitch(switches::kForceGpuRasterization); 1145 command_line->AppendSwitch(switches::kForceGpuRasterization);
1146 1146
1147 gfx::BufferUsage buffer_usage = IsPersistentGpuMemoryBufferEnabled() 1147 // Persistent buffers may come at a performance hit (not all platform specific
1148 // buffers support it), so only enable them if partial raster is enabled and
1149 // we are actually going to use them.
1150 gfx::BufferUsage buffer_usage = IsPartialRasterEnabled()
1148 ? gfx::BufferUsage::PERSISTENT_MAP 1151 ? gfx::BufferUsage::PERSISTENT_MAP
1149 : gfx::BufferUsage::MAP; 1152 : gfx::BufferUsage::MAP;
1150 std::vector<unsigned> image_targets( 1153 std::vector<unsigned> image_targets(
1151 static_cast<size_t>(gfx::BufferFormat::LAST) + 1, GL_TEXTURE_2D); 1154 static_cast<size_t>(gfx::BufferFormat::LAST) + 1, GL_TEXTURE_2D);
1152 for (size_t format = 0; 1155 for (size_t format = 0;
1153 format < static_cast<size_t>(gfx::BufferFormat::LAST) + 1; format++) { 1156 format < static_cast<size_t>(gfx::BufferFormat::LAST) + 1; format++) {
1154 image_targets[format] = 1157 image_targets[format] =
1155 BrowserGpuMemoryBufferManager::GetImageTextureTarget( 1158 BrowserGpuMemoryBufferManager::GetImageTextureTarget(
1156 static_cast<gfx::BufferFormat>(format), buffer_usage); 1159 static_cast<gfx::BufferFormat>(format), buffer_usage);
1157 } 1160 }
(...skipping 1375 matching lines...) Expand 10 before | Expand all | Expand 10 after
2533 void RenderProcessHostImpl::GetAudioOutputControllers( 2536 void RenderProcessHostImpl::GetAudioOutputControllers(
2534 const GetAudioOutputControllersCallback& callback) const { 2537 const GetAudioOutputControllersCallback& callback) const {
2535 audio_renderer_host()->GetOutputControllers(callback); 2538 audio_renderer_host()->GetOutputControllers(callback);
2536 } 2539 }
2537 2540
2538 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() { 2541 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() {
2539 return bluetooth_dispatcher_host_.get(); 2542 return bluetooth_dispatcher_host_.get();
2540 } 2543 }
2541 2544
2542 } // namespace content 2545 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/gpu/compositor_util.cc ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698