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 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1074 command_line->AppendSwitchASCII( | 1074 command_line->AppendSwitchASCII( |
1075 switches::kNumRasterThreads, | 1075 switches::kNumRasterThreads, |
1076 base::IntToString(NumberOfRendererRasterThreads())); | 1076 base::IntToString(NumberOfRendererRasterThreads())); |
1077 } else { | 1077 } else { |
1078 command_line->AppendSwitch(switches::kDisableImplSidePainting); | 1078 command_line->AppendSwitch(switches::kDisableImplSidePainting); |
1079 } | 1079 } |
1080 | 1080 |
1081 if (IsGpuRasterizationEnabled()) | 1081 if (IsGpuRasterizationEnabled()) |
1082 command_line->AppendSwitch(switches::kEnableGpuRasterization); | 1082 command_line->AppendSwitch(switches::kEnableGpuRasterization); |
1083 | 1083 |
1084 if (GpuRasterizationMSAASampleCount() > 0) { | |
danakj
2015/01/27 17:59:35
FWIW You could remove the if() here and the if(Has
piman
2015/01/27 18:07:16
nit: cache the return value of GpuRasterizationMSA
Stephen White
2015/01/27 18:11:45
Done.
| |
1085 command_line->AppendSwitchASCII( | |
1086 switches::kGpuRasterizationMSAASampleCount, | |
1087 base::IntToString(GpuRasterizationMSAASampleCount())); | |
1088 } | |
1089 | |
1084 DCHECK_IMPLIES(IsZeroCopyUploadEnabled(), !IsOneCopyUploadEnabled()); | 1090 DCHECK_IMPLIES(IsZeroCopyUploadEnabled(), !IsOneCopyUploadEnabled()); |
1085 DCHECK_IMPLIES(IsOneCopyUploadEnabled(), !IsZeroCopyUploadEnabled()); | 1091 DCHECK_IMPLIES(IsOneCopyUploadEnabled(), !IsZeroCopyUploadEnabled()); |
1086 if (IsZeroCopyUploadEnabled()) | 1092 if (IsZeroCopyUploadEnabled()) |
1087 command_line->AppendSwitch(switches::kEnableZeroCopy); | 1093 command_line->AppendSwitch(switches::kEnableZeroCopy); |
1088 if (!IsOneCopyUploadEnabled()) | 1094 if (!IsOneCopyUploadEnabled()) |
1089 command_line->AppendSwitch(switches::kDisableOneCopy); | 1095 command_line->AppendSwitch(switches::kDisableOneCopy); |
1090 | 1096 |
1091 if (IsForceGpuRasterizationEnabled()) | 1097 if (IsForceGpuRasterizationEnabled()) |
danakj
2015/01/27 17:59:35
Ah ya, I missed this, sorry. LGTM
| |
1092 command_line->AppendSwitch(switches::kForceGpuRasterization); | 1098 command_line->AppendSwitch(switches::kForceGpuRasterization); |
1093 | 1099 |
1094 if (BrowserGpuChannelHostFactory::IsGpuMemoryBufferFactoryUsageEnabled( | 1100 if (BrowserGpuChannelHostFactory::IsGpuMemoryBufferFactoryUsageEnabled( |
1095 gfx::GpuMemoryBuffer::MAP)) { | 1101 gfx::GpuMemoryBuffer::MAP)) { |
1096 std::vector<gfx::GpuMemoryBufferType> supported_types; | 1102 std::vector<gfx::GpuMemoryBufferType> supported_types; |
1097 GpuMemoryBufferFactory::GetSupportedTypes(&supported_types); | 1103 GpuMemoryBufferFactory::GetSupportedTypes(&supported_types); |
1098 DCHECK(!supported_types.empty()); | 1104 DCHECK(!supported_types.empty()); |
1099 | 1105 |
1100 // The GPU service will always use the preferred type. | 1106 // The GPU service will always use the preferred type. |
1101 gfx::GpuMemoryBufferType type = supported_types[0]; | 1107 gfx::GpuMemoryBufferType type = supported_types[0]; |
(...skipping 1268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2370 | 2376 |
2371 void RenderProcessHostImpl::DecrementWorkerRefCount() { | 2377 void RenderProcessHostImpl::DecrementWorkerRefCount() { |
2372 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 2378 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
2373 DCHECK_GT(worker_ref_count_, 0); | 2379 DCHECK_GT(worker_ref_count_, 0); |
2374 --worker_ref_count_; | 2380 --worker_ref_count_; |
2375 if (worker_ref_count_ == 0) | 2381 if (worker_ref_count_ == 0) |
2376 Cleanup(); | 2382 Cleanup(); |
2377 } | 2383 } |
2378 | 2384 |
2379 } // namespace content | 2385 } // namespace content |
OLD | NEW |