From 976f647c3874a7b72b881e8592a04f6b57fc16f9 Mon Sep 17 00:00:00 2001 From: reveman Date: Wed, 10 Jun 2015 22:11:54 -0700 Subject: [PATCH] Re-land: content: Enable one-copy tile updates on Android. BUG=460288 Review URL: https://codereview.chromium.org/1173893003 Cr-Commit-Position: refs/heads/master@{#333894} --- chrome/app/generated_resources.grd | 12 ++++++------ chrome/browser/about_flags.cc | 13 ++++++------- chrome/browser/chromeos/login/chrome_restart_request.cc | 1 - content/browser/gpu/compositor_util.cc | 10 +--------- content/public/common/content_switches.cc | 4 ---- content/public/common/content_switches.h | 1 - 6 files changed, 13 insertions(+), 28 deletions(-) diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd index b6de68a57d04..503430dc9dd9 100644 --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd @@ -6511,16 +6511,16 @@ Keep your key file in a safe place. You will need it to create new versions of y If enabled, the renderer delegates compositing to the browser, merging both compositing passes. - - Enable one-copy rasterizer + + Disable one-copy rasterizer - - If enabled, raster threads write to GPU memory. + + If disabled, raster threads won't write to GPU memory. - + Enable zero-copy rasterizer - + If enabled, raster threads write directly to GPU memory associated with tiles. diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc index 73b9f02356db..155433dbe309 100644 --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc @@ -1608,17 +1608,16 @@ const Experiment kExperiments[] = { }, #endif { - "enable-one-copy", - IDS_FLAGS_ONE_COPY_NAME, - IDS_FLAGS_ONE_COPY_DESCRIPTION, + "disable-one-copy", + IDS_FLAGS_DISABLE_ONE_COPY_NAME, + IDS_FLAGS_DISABLE_ONE_COPY_DESCRIPTION, kOsAll, - ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOneCopy, - switches::kDisableOneCopy) + SINGLE_VALUE_TYPE(switches::kDisableOneCopy) }, { "enable-zero-copy", - IDS_FLAGS_ZERO_COPY_NAME, - IDS_FLAGS_ZERO_COPY_DESCRIPTION, + IDS_FLAGS_ENABLE_ZERO_COPY_NAME, + IDS_FLAGS_ENABLE_ZERO_COPY_DESCRIPTION, kOsAll, SINGLE_VALUE_TYPE(switches::kEnableZeroCopy) }, diff --git a/chrome/browser/chromeos/login/chrome_restart_request.cc b/chrome/browser/chromeos/login/chrome_restart_request.cc index f0d78fb51ef3..6041069d036b 100644 --- a/chrome/browser/chromeos/login/chrome_restart_request.cc +++ b/chrome/browser/chromeos/login/chrome_restart_request.cc @@ -109,7 +109,6 @@ std::string DeriveCommandLine(const GURL& start_url, ::switches::kEnableImageColorProfiles, ::switches::kEnableLogging, ::switches::kEnableLowResTiling, - ::switches::kEnableOneCopy, ::switches::kEnablePinch, ::switches::kEnablePreferCompositingToLCDText, ::switches::kEnablePluginPlaceholderShadowDom, diff --git a/content/browser/gpu/compositor_util.cc b/content/browser/gpu/compositor_util.cc index 635944fba142..25cedaf82fd1 100644 --- a/content/browser/gpu/compositor_util.cc +++ b/content/browser/gpu/compositor_util.cc @@ -238,15 +238,7 @@ bool IsOneCopyUploadEnabled() { const base::CommandLine& command_line = *base::CommandLine::ForCurrentProcess(); - if (command_line.HasSwitch(switches::kEnableOneCopy)) - return true; - if (command_line.HasSwitch(switches::kDisableOneCopy)) - return false; - -#if defined(OS_ANDROID) - return false; -#endif - return true; + return !command_line.HasSwitch(switches::kDisableOneCopy); } bool IsZeroCopyUploadEnabled() { diff --git a/content/public/common/content_switches.cc b/content/public/common/content_switches.cc index d383ef472d48..5c5fae5f4178 100644 --- a/content/public/common/content_switches.cc +++ b/content/public/common/content_switches.cc @@ -199,7 +199,6 @@ const char kDisableNamespaceSandbox[] = "disable-namespace-sandbox"; const char kDisableNotifications[] = "disable-notifications"; // Disable rasterizer that writes directly to GPU memory. -// Overrides the kEnableOneCopy flag. const char kDisableOneCopy[] = "disable-one-copy"; // Disable Pepper3D. @@ -375,9 +374,6 @@ const char kEnableMemoryBenchmarking[] = "enable-memory-benchmarking"; // Enables the network information API. const char kEnableNetworkInformation[] = "enable-network-information"; -// Enable rasterizer that writes directly to GPU memory. -const char kEnableOneCopy[] = "enable-one-copy"; - // Enables use of hardware overlay for fullscreen video playback. Android only. const char kEnableOverlayFullscreenVideo[] = "enable-overlay-fullscreen-video"; diff --git a/content/public/common/content_switches.h b/content/public/common/content_switches.h index 72ac49314dab..2fdae75cd9b8 100644 --- a/content/public/common/content_switches.h +++ b/content/public/common/content_switches.h @@ -117,7 +117,6 @@ CONTENT_EXPORT extern const char kEnableLCDText[]; CONTENT_EXPORT extern const char kEnableLogging[]; extern const char kEnableMemoryBenchmarking[]; CONTENT_EXPORT extern const char kEnableNetworkInformation[]; -CONTENT_EXPORT extern const char kEnableOneCopy[]; CONTENT_EXPORT extern const char kEnableOverlayFullscreenVideo[]; CONTENT_EXPORT extern const char kEnablePinch[]; CONTENT_EXPORT extern const char kEnablePluginPlaceholderTesting[]; -- 2.11.4.GIT