Commit 91a0a870 authored by reveman's avatar reveman Committed by Commit bot

content: Enable 1-copy rasterizer on all platforms but Android and MacOS.

BUG=406404

Review URL: https://codereview.chromium.org/686013002

Cr-Commit-Position: refs/heads/master@{#302567}
parent fc3df0ba
......@@ -305,12 +305,12 @@ const Experiment::Choice kOverlayScrollbarChoices[] = {
};
#endif
const Experiment::Choice kZeroCopyChoices[] = {
const Experiment::Choice kOneCopyChoices[] = {
{ IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
{ IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
switches::kEnableZeroCopy, ""},
switches::kEnableOneCopy, ""},
{ IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
switches::kDisableZeroCopy, ""}
switches::kDisableOneCopy, ""}
};
#if defined(OS_ANDROID)
......@@ -1550,14 +1550,14 @@ const Experiment kExperiments[] = {
IDS_FLAGS_ONE_COPY_NAME,
IDS_FLAGS_ONE_COPY_DESCRIPTION,
kOsAll,
SINGLE_VALUE_TYPE(switches::kEnableOneCopy)
MULTI_VALUE_TYPE(kOneCopyChoices)
},
{
"enable-zero-copy",
IDS_FLAGS_ZERO_COPY_NAME,
IDS_FLAGS_ZERO_COPY_DESCRIPTION,
kOsAll,
MULTI_VALUE_TYPE(kZeroCopyChoices)
SINGLE_VALUE_TYPE(switches::kEnableZeroCopy)
},
#if defined(OS_CHROMEOS)
{
......
......@@ -85,6 +85,7 @@ std::string DeriveCommandLine(const GURL& start_url,
::switches::kDisableImplSidePainting,
::switches::kDisableLowResTiling,
::switches::kDisableMediaSource,
::switches::kDisableOneCopy,
::switches::kDisablePreferCompositingToLCDText,
::switches::kDisablePrefixedEncryptedMedia,
::switches::kDisablePanelFitting,
......@@ -93,7 +94,6 @@ std::string DeriveCommandLine(const GURL& start_url,
::switches::kDisableThreadedScrolling,
::switches::kDisableTouchDragDrop,
::switches::kDisableTouchEditing,
::switches::kDisableZeroCopy,
::switches::kEnableAcceleratedJpegDecoding,
::switches::kEnableBeginFrameScheduling,
::switches::kEnablePreferCompositingToLCDText,
......
......@@ -1096,6 +1096,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
switches::kDisableLocalStorage,
switches::kDisableLogging,
switches::kDisableMediaSource,
switches::kDisableOneCopy,
switches::kDisableOverlayScrollbar,
switches::kDisablePinch,
switches::kDisablePrefixedEncryptedMedia,
......@@ -1109,7 +1110,6 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
switches::kDisableTouchDragDrop,
switches::kDisableTouchEditing,
switches::kDisableV8IdleNotificationAfterCommit,
switches::kDisableZeroCopy,
switches::kDomAutomationController,
switches::kEnableAcceleratedJpegDecoding,
switches::kEnableBeginFrameScheduling,
......
......@@ -205,6 +205,10 @@ const char kDisableLogging[] = "disable-logging";
// Disables Media Source API (i.e., the MediaSource object).
const char kDisableMediaSource[] = "disable-media-source";
// Disable rasterizer that writes directly to GPU memory.
// Overrides the kEnableOneCopy flag.
const char kDisableOneCopy[] = "disable-one-copy";
// Disable Pepper3D.
const char kDisablePepper3d[] = "disable-pepper-3d";
......@@ -271,10 +275,6 @@ const char kDisableXSLT[] = "disable-xslt";
// Disables Blink's XSSAuditor. The XSSAuditor mitigates reflective XSS.
const char kDisableXSSAuditor[] = "disable-xss-auditor";
// Disable rasterizer that writes directly to GPU memory associated with tiles.
// Overrides the kEnableZeroCopy flag.
const char kDisableZeroCopy[] = "disable-zero-copy";
// Specifies if the |DOMAutomationController| needs to be bound in the
// renderer. This binding happens on per-frame basis and hence can potentially
// be a performance bottleneck. One should only enable it when automating dom
......
......@@ -68,6 +68,7 @@ extern const char kDisableKillAfterBadIPC[];
CONTENT_EXPORT extern const char kDisableLocalStorage[];
CONTENT_EXPORT extern const char kDisableLogging[];
CONTENT_EXPORT extern const char kDisableMediaSource[];
CONTENT_EXPORT extern const char kDisableOneCopy[];
extern const char kDisablePepper3d[];
CONTENT_EXPORT extern const char kDisablePinch[];
CONTENT_EXPORT extern const char kDisablePlugins[];
......@@ -88,7 +89,6 @@ extern const char kDisableV8IdleNotificationAfterCommit[];
CONTENT_EXPORT extern const char kDisableWebSecurity[];
extern const char kDisableXSLT[];
extern const char kDisableXSSAuditor[];
CONTENT_EXPORT extern const char kDisableZeroCopy[];
CONTENT_EXPORT extern const char kDomAutomationController[];
extern const char kEnable2dCanvasClipAntialiasing[];
CONTENT_EXPORT extern const char kEnableAcceleratedJpegDecoding[];
......
......@@ -493,10 +493,13 @@ void RenderThreadImpl::Init() {
cc_blink::WebLayerImpl::SetImplSidePaintingEnabled(
is_impl_side_painting_enabled_);
is_zero_copy_enabled_ = command_line.HasSwitch(switches::kEnableZeroCopy) &&
!command_line.HasSwitch(switches::kDisableZeroCopy);
is_zero_copy_enabled_ = command_line.HasSwitch(switches::kEnableZeroCopy);
#if defined(OS_MACOSX) || defined(OS_ANDROID)
is_one_copy_enabled_ = command_line.HasSwitch(switches::kEnableOneCopy);
#else
is_one_copy_enabled_ = !command_line.HasSwitch(switches::kDisableOneCopy);
#endif
if (command_line.HasSwitch(switches::kDisableLCDText)) {
is_lcd_text_enabled_ = false;
......
......@@ -47507,6 +47507,7 @@ To add a new entry, add it with any value and run test to compute valid value.
<int value="-562274241" label="enable-extension-action-redesign"/>
<int value="-536289234" label="ssl-interstitial-v2-colorful"/>
<int value="-516845951" label="enable-embedded-extension-options"/>
<int value="-512971943" label="disable-one-copy"/>
<int value="-510488450" label="disable-pnacl"/>
<int value="-508143738" label="disable-accelerated-fixed-root-background"/>
<int value="-495585885" label="enable-spdy-proxy-dev-auth-origin"/>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment