Commit 72d3735a authored by junov@chromium.org's avatar junov@chromium.org

Add runtime flag to enable the display list 2D canvas implementation

This change adds the command line switch --enable-display-list-2d-canvas
and adds a corresponding entry to the chrome://flags page

BUG=392594

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285119 0039d316-1c4b-4281-b951-d872f2087c98
parent 184429b7
......@@ -5724,6 +5724,12 @@ Keep your key file in a safe place. You will need it to create new versions of y
<message name="IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_DESCRIPTION" desc="Description of the 'Disable accelerated 2D canvas' lab.">
Disables the use of the GPU to perform 2d canvas rendering and instead uses software rendering.
</message>
<message name="IDS_FLAGS_ENABLE_DISPLAY_LIST_2D_CANVAS_NAME" desc="Name of the 'Enable display list 2D canvas' lab.">
Enable display list 2D canvas
</message>
<message name="IDS_FLAGS_ENABLE_DISPLAY_LIST_2D_CANVAS_DESCRIPTION" desc="Description of the 'Enable display list 2D canvas' lab.">
Enables the use of display lists to record 2D canvas commands. This allows 2D canvas rasterization to be performed on separate thread.
</message>
<message name="IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_NAME" desc="Name of the 'Experimental Extension APIs' lab.">
Experimental Extension APIs
</message>
......
......@@ -574,6 +574,13 @@ const Experiment kExperiments[] = {
kOsAll,
SINGLE_VALUE_TYPE(switches::kDisableAccelerated2dCanvas)
},
{
"enable-display-list-2d-canvas",
IDS_FLAGS_ENABLE_DISPLAY_LIST_2D_CANVAS_NAME,
IDS_FLAGS_ENABLE_DISPLAY_LIST_2D_CANVAS_DESCRIPTION,
kOsAll,
SINGLE_VALUE_TYPE(switches::kEnableDisplayList2dCanvas)
},
{
"composited-layer-borders",
IDS_FLAGS_COMPOSITED_LAYER_BORDERS,
......
......@@ -98,6 +98,7 @@ std::string DeriveCommandLine(const GURL& start_url,
::switches::kEnableBeginFrameScheduling,
::switches::kEnableCompositingForFixedPosition,
::switches::kEnableDelegatedRenderer,
::switches::kEnableDisplayList2dCanvas,
::switches::kEnableEncryptedMedia,
::switches::kEnableFastTextAutosizing,
::switches::kDisableGpuSandbox,
......
......@@ -1125,6 +1125,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
switches::kEnableCompositingForFixedPosition,
switches::kEnableCompositingForTransition,
switches::kEnableDeferredImageDecoding,
switches::kEnableDisplayList2dCanvas,
switches::kEnableDistanceFieldText,
switches::kEnableEncryptedMedia,
switches::kEnableExperimentalCanvasFeatures,
......
......@@ -132,6 +132,9 @@ void SetRuntimeFeaturesDefaultsAndUpdateFromArgs(
if (command_line.HasSwitch(switches::kEnableSpeechSynthesis))
WebRuntimeFeatures::enableSpeechSynthesis(true);
if (command_line.HasSwitch(switches::kEnableDisplayList2dCanvas))
WebRuntimeFeatures::enableDisplayList2dCanvas(true);
if (command_line.HasSwitch(switches::kEnableWebGLDraftExtensions))
WebRuntimeFeatures::enableWebGLDraftExtensions(true);
......
......@@ -349,6 +349,9 @@ const char kEnableDeferredImageDecoding[] = "enable-deferred-image-decoding";
// Enables delegated renderer.
const char kEnableDelegatedRenderer[] = "enable-delegated-renderer";
// Enables display list based 2d canvas implementation.
const char kEnableDisplayList2dCanvas[] = "enable-display-list-2d-canvas";
// Enables restarting interrupted downloads.
const char kEnableDownloadResumption[] = "enable-download-resumption";
......
......@@ -101,6 +101,7 @@ CONTENT_EXPORT extern const char kEnableCompositingForFixedPosition[];
CONTENT_EXPORT extern const char kEnableCompositingForTransition[];
CONTENT_EXPORT extern const char kEnableDeferredImageDecoding[];
CONTENT_EXPORT extern const char kEnableDelegatedRenderer[];
CONTENT_EXPORT extern const char kEnableDisplayList2dCanvas[];
CONTENT_EXPORT extern const char kEnableDistanceFieldText[];
CONTENT_EXPORT extern const char kEnableDownloadResumption[];
CONTENT_EXPORT extern const char kEnableEncryptedMedia[];
......
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