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

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

Issue 2654993004: Move GPU blacklist calculation to GPU proc (Closed)
Patch Set: Feedback + add rest of logic back in Created 3 years, 10 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 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 1554 matching lines...) Expand 10 before | Expand all | Expand 10 after
1565 1565
1566 StoragePartition* RenderProcessHostImpl::GetStoragePartition() const { 1566 StoragePartition* RenderProcessHostImpl::GetStoragePartition() const {
1567 return storage_partition_impl_; 1567 return storage_partition_impl_;
1568 } 1568 }
1569 1569
1570 static void AppendCompositorCommandLineFlags(base::CommandLine* command_line) { 1570 static void AppendCompositorCommandLineFlags(base::CommandLine* command_line) {
1571 command_line->AppendSwitchASCII( 1571 command_line->AppendSwitchASCII(
1572 switches::kNumRasterThreads, 1572 switches::kNumRasterThreads,
1573 base::IntToString(NumberOfRendererRasterThreads())); 1573 base::IntToString(NumberOfRendererRasterThreads()));
1574 1574
1575 if (IsGpuRasterizationEnabled())
1576 command_line->AppendSwitch(switches::kEnableGpuRasterization);
1577
1578 if (IsAsyncWorkerContextEnabled()) 1575 if (IsAsyncWorkerContextEnabled())
1579 command_line->AppendSwitch(switches::kEnableGpuAsyncWorkerContext); 1576 command_line->AppendSwitch(switches::kEnableGpuAsyncWorkerContext);
1580 1577
1581 int msaa_sample_count = GpuRasterizationMSAASampleCount(); 1578 int msaa_sample_count = GpuRasterizationMSAASampleCount();
1582 if (msaa_sample_count >= 0) { 1579 if (msaa_sample_count >= 0) {
1583 command_line->AppendSwitchASCII(switches::kGpuRasterizationMSAASampleCount, 1580 command_line->AppendSwitchASCII(switches::kGpuRasterizationMSAASampleCount,
1584 base::IntToString(msaa_sample_count)); 1581 base::IntToString(msaa_sample_count));
1585 } 1582 }
1586 1583
1587 if (IsZeroCopyUploadEnabled()) 1584 if (IsZeroCopyUploadEnabled())
1588 command_line->AppendSwitch(switches::kEnableZeroCopy); 1585 command_line->AppendSwitch(switches::kEnableZeroCopy);
1589 if (!IsPartialRasterEnabled()) 1586 if (!IsPartialRasterEnabled())
1590 command_line->AppendSwitch(switches::kDisablePartialRaster); 1587 command_line->AppendSwitch(switches::kDisablePartialRaster);
1591 1588
1592 if (IsForceGpuRasterizationEnabled())
1593 command_line->AppendSwitch(switches::kForceGpuRasterization);
1594
1595 if (IsGpuMemoryBufferCompositorResourcesEnabled()) { 1589 if (IsGpuMemoryBufferCompositorResourcesEnabled()) {
1596 command_line->AppendSwitch( 1590 command_line->AppendSwitch(
1597 switches::kEnableGpuMemoryBufferCompositorResources); 1591 switches::kEnableGpuMemoryBufferCompositorResources);
1598 } 1592 }
1599 1593
1600 if (IsMainFrameBeforeActivationEnabled()) 1594 if (IsMainFrameBeforeActivationEnabled())
1601 command_line->AppendSwitch(cc::switches::kEnableMainFrameBeforeActivation); 1595 command_line->AppendSwitch(cc::switches::kEnableMainFrameBeforeActivation);
1602 1596
1603 cc::BufferToTextureTargetMap image_targets; 1597 cc::BufferToTextureTargetMap image_targets;
1604 for (int usage_idx = 0; usage_idx <= static_cast<int>(gfx::BufferUsage::LAST); 1598 for (int usage_idx = 0; usage_idx <= static_cast<int>(gfx::BufferUsage::LAST);
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
1764 switches::kEnableVtune, 1758 switches::kEnableVtune,
1765 switches::kEnableWebFontsInterventionTrigger, 1759 switches::kEnableWebFontsInterventionTrigger,
1766 switches::kEnableWebFontsInterventionV2, 1760 switches::kEnableWebFontsInterventionV2,
1767 switches::kEnableWebGLDraftExtensions, 1761 switches::kEnableWebGLDraftExtensions,
1768 switches::kEnableWebGLImageChromium, 1762 switches::kEnableWebGLImageChromium,
1769 switches::kEnableWebVR, 1763 switches::kEnableWebVR,
1770 switches::kExplicitlyAllowedPorts, 1764 switches::kExplicitlyAllowedPorts,
1771 switches::kForceDeviceScaleFactor, 1765 switches::kForceDeviceScaleFactor,
1772 switches::kForceDisplayList2dCanvas, 1766 switches::kForceDisplayList2dCanvas,
1773 switches::kForceGpuMemAvailableMb, 1767 switches::kForceGpuMemAvailableMb,
1768 switches::kForceGpuRasterization,
1774 switches::kEnableCanvas2dDynamicRenderingModeSwitching, 1769 switches::kEnableCanvas2dDynamicRenderingModeSwitching,
1775 switches::kForceOverlayFullscreenVideo, 1770 switches::kForceOverlayFullscreenVideo,
1776 switches::kFullMemoryCrashReport, 1771 switches::kFullMemoryCrashReport,
1777 switches::kInertVisualViewport, 1772 switches::kInertVisualViewport,
1778 switches::kIPCConnectionTimeout, 1773 switches::kIPCConnectionTimeout,
1779 switches::kIsRunningInMash, 1774 switches::kIsRunningInMash,
1780 switches::kJavaScriptFlags, 1775 switches::kJavaScriptFlags,
1781 switches::kLoggingLevel, 1776 switches::kLoggingLevel,
1782 switches::kMainFrameResizesAreOrientationChanges, 1777 switches::kMainFrameResizesAreOrientationChanges,
1783 switches::kMaxUntiledLayerWidth, 1778 switches::kMaxUntiledLayerWidth,
(...skipping 1272 matching lines...) Expand 10 before | Expand all | Expand 10 after
3056 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; 3051 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error;
3057 3052
3058 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. 3053 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing.
3059 // Capture the error message in a crash key value. 3054 // Capture the error message in a crash key value.
3060 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); 3055 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error);
3061 bad_message::ReceivedBadMessage(render_process_id, 3056 bad_message::ReceivedBadMessage(render_process_id,
3062 bad_message::RPH_MOJO_PROCESS_ERROR); 3057 bad_message::RPH_MOJO_PROCESS_ERROR);
3063 } 3058 }
3064 3059
3065 } // namespace content 3060 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698