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

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

Issue 881513004: Add a command-line flag to set GPU rasterization multisampling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 1059 matching lines...) Expand 10 before | Expand all | Expand 10 after
1070 if (IsDelegatedRendererEnabled()) 1070 if (IsDelegatedRendererEnabled())
1071 command_line->AppendSwitch(switches::kEnableDelegatedRenderer); 1071 command_line->AppendSwitch(switches::kEnableDelegatedRenderer);
1072 1072
1073 if (IsImplSidePaintingEnabled()) { 1073 if (IsImplSidePaintingEnabled()) {
1074 command_line->AppendSwitch(switches::kEnableImplSidePainting); 1074 command_line->AppendSwitch(switches::kEnableImplSidePainting);
1075 command_line->AppendSwitchASCII( 1075 command_line->AppendSwitchASCII(
1076 switches::kNumRasterThreads, 1076 switches::kNumRasterThreads,
1077 base::IntToString(NumberOfRendererRasterThreads())); 1077 base::IntToString(NumberOfRendererRasterThreads()));
1078 } 1078 }
1079 1079
1080 if (IsGpuRasterizationEnabled()) 1080 if (IsGpuRasterizationEnabled()) {
1081 command_line->AppendSwitch(switches::kEnableGpuRasterization); 1081 command_line->AppendSwitch(switches::kEnableGpuRasterization);
1082 command_line->AppendSwitchASCII(
1083 switches::kGpuRasterizationMSAASampleCount,
1084 base::IntToString(GpuRasterizationMSAASampleCount()));
1085 }
1082 1086
1083 DCHECK_IMPLIES(IsZeroCopyUploadEnabled(), !IsOneCopyUploadEnabled()); 1087 DCHECK_IMPLIES(IsZeroCopyUploadEnabled(), !IsOneCopyUploadEnabled());
1084 DCHECK_IMPLIES(IsOneCopyUploadEnabled(), !IsZeroCopyUploadEnabled()); 1088 DCHECK_IMPLIES(IsOneCopyUploadEnabled(), !IsZeroCopyUploadEnabled());
1085 if (IsZeroCopyUploadEnabled()) 1089 if (IsZeroCopyUploadEnabled())
1086 command_line->AppendSwitch(switches::kEnableZeroCopy); 1090 command_line->AppendSwitch(switches::kEnableZeroCopy);
1087 if (!IsOneCopyUploadEnabled()) 1091 if (!IsOneCopyUploadEnabled())
1088 command_line->AppendSwitch(switches::kDisableOneCopy); 1092 command_line->AppendSwitch(switches::kDisableOneCopy);
1089 1093
1090 if (IsForceGpuRasterizationEnabled()) 1094 if (IsForceGpuRasterizationEnabled())
1091 command_line->AppendSwitch(switches::kForceGpuRasterization); 1095 command_line->AppendSwitch(switches::kForceGpuRasterization);
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
1285 switches::kUseDiscardableMemory, 1289 switches::kUseDiscardableMemory,
1286 // This flag needs to be propagated to the renderer process for 1290 // This flag needs to be propagated to the renderer process for
1287 // --in-process-webgl. 1291 // --in-process-webgl.
1288 switches::kUseGL, 1292 switches::kUseGL,
1289 switches::kUseMobileUserAgent, 1293 switches::kUseMobileUserAgent,
1290 switches::kUseNormalPriorityForTileTaskWorkerThreads, 1294 switches::kUseNormalPriorityForTileTaskWorkerThreads,
1291 switches::kV, 1295 switches::kV,
1292 switches::kVideoThreads, 1296 switches::kVideoThreads,
1293 switches::kVModule, 1297 switches::kVModule,
1294 // Please keep these in alphabetical order. Compositor switches here should 1298 // Please keep these in alphabetical order. Compositor switches here should
1295 // also be added to chrome/browser/chromeos/login/chrome_restart_request.cc. 1299 // also be added to chrome/browser/chromeos/login/chrome_restart_request.cc.
danakj 2015/01/26 21:04:32 Please add the flag to this file so that you get t
Stephen White 2015/01/26 22:39:51 Done.
1296 cc::switches::kCompositeToMailbox, 1300 cc::switches::kCompositeToMailbox,
1297 cc::switches::kDisableCompositedAntialiasing, 1301 cc::switches::kDisableCompositedAntialiasing,
1298 cc::switches::kDisableMainFrameBeforeActivation, 1302 cc::switches::kDisableMainFrameBeforeActivation,
1299 cc::switches::kDisableThreadedAnimation, 1303 cc::switches::kDisableThreadedAnimation,
1300 cc::switches::kEnableGpuBenchmarking, 1304 cc::switches::kEnableGpuBenchmarking,
1301 cc::switches::kEnableMainFrameBeforeActivation, 1305 cc::switches::kEnableMainFrameBeforeActivation,
1302 cc::switches::kEnableTopControlsPositionCalculation, 1306 cc::switches::kEnableTopControlsPositionCalculation,
1303 cc::switches::kMaxTilesForInterestArea, 1307 cc::switches::kMaxTilesForInterestArea,
1304 cc::switches::kMaxUnusedResourceMemoryUsagePercentage, 1308 cc::switches::kMaxUnusedResourceMemoryUsagePercentage,
1305 cc::switches::kShowCompositedLayerBorders, 1309 cc::switches::kShowCompositedLayerBorders,
(...skipping 1053 matching lines...) Expand 10 before | Expand all | Expand 10 after
2359 2363
2360 void RenderProcessHostImpl::DecrementWorkerRefCount() { 2364 void RenderProcessHostImpl::DecrementWorkerRefCount() {
2361 DCHECK_CURRENTLY_ON(BrowserThread::UI); 2365 DCHECK_CURRENTLY_ON(BrowserThread::UI);
2362 DCHECK_GT(worker_ref_count_, 0); 2366 DCHECK_GT(worker_ref_count_, 0);
2363 --worker_ref_count_; 2367 --worker_ref_count_;
2364 if (worker_ref_count_ == 0) 2368 if (worker_ref_count_ == 0)
2365 Cleanup(); 2369 Cleanup();
2366 } 2370 }
2367 2371
2368 } // namespace content 2372 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698