diff options
-rw-r--r-- | cc/base/switches.cc | 9 | ||||
-rw-r--r-- | cc/base/switches.h | 3 | ||||
-rw-r--r-- | cc/blink/web_content_layer_impl.cc | 10 | ||||
-rw-r--r-- | chrome/browser/chromeos/login/chrome_restart_request.cc | 3 | ||||
-rw-r--r-- | content/browser/renderer_host/render_process_host_impl.cc | 1 | ||||
-rw-r--r-- | content/public/common/content_switches.cc | 8 | ||||
-rw-r--r-- | content/public/common/content_switches.h | 2 | ||||
-rw-r--r-- | ui/compositor/compositor.cc | 2 | ||||
-rw-r--r-- | ui/compositor/compositor_switches.cc | 3 | ||||
-rw-r--r-- | ui/compositor/compositor_switches.h | 1 |
10 files changed, 29 insertions, 13 deletions
diff --git a/cc/base/switches.cc b/cc/base/switches.cc index 0db1503..9a5b039 100644 --- a/cc/base/switches.cc +++ b/cc/base/switches.cc @@ -11,6 +11,12 @@ namespace switches { const char kDisableThreadedAnimation[] = "disable-threaded-animation"; +// Disables the use of a cached picture for raster in the renderer, +// making raster go directly from the display item list (this is the data +// structure surfaced to tracing). This is useful for debugging to remove +// the cached picture from the pipeline to narrow down bugs. +const char kDisableCachedPictureRaster[] = "disable-cached-picture-raster"; + // Disables layer-edge anti-aliasing in the compositor. const char kDisableCompositedAntialiasing[] = "disable-composited-antialiasing"; @@ -44,9 +50,6 @@ const char kStrictLayerPropertyChangeChecking[] = const char kEnablePropertyTreeVerification[] = "enable-property-tree-verification"; -// Disable partial swap which is needed for some OpenGL drivers / emulators. -const char kUIDisablePartialSwap[] = "ui-disable-partial-swap"; - // Use a BeginFrame signal from browser to renderer to schedule rendering. const char kEnableBeginFrameScheduling[] = "enable-begin-frame-scheduling"; diff --git a/cc/base/switches.h b/cc/base/switches.h index 3bce14e..d72b250 100644 --- a/cc/base/switches.h +++ b/cc/base/switches.h @@ -17,10 +17,10 @@ namespace switches { // Switches for the renderer compositor only. CC_EXPORT extern const char kDisableThreadedAnimation[]; +CC_EXPORT extern const char kDisableCachedPictureRaster[]; CC_EXPORT extern const char kDisableCompositedAntialiasing[]; CC_EXPORT extern const char kDisableMainFrameBeforeActivation[]; CC_EXPORT extern const char kEnableMainFrameBeforeActivation[]; -CC_EXPORT extern const char kJankInsteadOfCheckerboard[]; CC_EXPORT extern const char kTopControlsHideThreshold[]; CC_EXPORT extern const char kTopControlsShowThreshold[]; CC_EXPORT extern const char kSlowDownRasterScaleFactor[]; @@ -28,7 +28,6 @@ CC_EXPORT extern const char kStrictLayerPropertyChangeChecking[]; CC_EXPORT extern const char kEnablePropertyTreeVerification[]; // Switches for both the renderer and ui compositors. -CC_EXPORT extern const char kUIDisablePartialSwap[]; CC_EXPORT extern const char kEnableBeginFrameScheduling[]; CC_EXPORT extern const char kEnableGpuBenchmarking[]; diff --git a/cc/blink/web_content_layer_impl.cc b/cc/blink/web_content_layer_impl.cc index 4ccd763..b7f4989 100644 --- a/cc/blink/web_content_layer_impl.cc +++ b/cc/blink/web_content_layer_impl.cc @@ -4,6 +4,8 @@ #include "cc/blink/web_content_layer_impl.h" +#include "base/command_line.h" +#include "cc/base/switches.h" #include "cc/blink/web_display_item_list_impl.h" #include "cc/layers/picture_layer.h" #include "cc/playback/display_item_list_settings.h" @@ -18,6 +20,12 @@ using cc::PictureLayer; namespace cc_blink { +static bool UseCachedPictureRaster() { + static bool use = !base::CommandLine::ForCurrentProcess()->HasSwitch( + cc::switches::kDisableCachedPictureRaster); + return use; +} + static blink::WebContentLayerClient::PaintingControlSetting PaintingControlToWeb( cc::ContentLayerClient::PaintingControlSetting painting_control) { @@ -69,7 +77,7 @@ WebContentLayerImpl::PaintContentsToDisplayList( const gfx::Rect& clip, cc::ContentLayerClient::PaintingControlSetting painting_control) { cc::DisplayItemListSettings settings; - settings.use_cached_picture = true; + settings.use_cached_picture = UseCachedPictureRaster(); scoped_refptr<cc::DisplayItemList> display_list = cc::DisplayItemList::Create(clip, settings); diff --git a/chrome/browser/chromeos/login/chrome_restart_request.cc b/chrome/browser/chromeos/login/chrome_restart_request.cc index 1cd1713..9fd082e 100644 --- a/chrome/browser/chromeos/login/chrome_restart_request.cc +++ b/chrome/browser/chromeos/login/chrome_restart_request.cc @@ -146,6 +146,7 @@ void DeriveCommandLine(const GURL& start_url, #if defined(ENABLE_TOPCHROME_MD) ::switches::kTopChromeMD, #endif + ::switches::kUIDisablePartialSwap, ::switches::kUIEnableCompositorAnimationTimelines, ::switches::kUIPrioritizeInGpuProcess, #if defined(USE_CRAS) @@ -185,6 +186,7 @@ void DeriveCommandLine(const GURL& start_url, // Please keep these in alphabetical order. Non-UI Compositor switches // here should also be added to // content/browser/renderer_host/render_process_host_impl.cc. + cc::switches::kDisableCachedPictureRaster, cc::switches::kDisableCompositedAntialiasing, cc::switches::kDisableMainFrameBeforeActivation, cc::switches::kDisableThreadedAnimation, @@ -200,7 +202,6 @@ void DeriveCommandLine(const GURL& start_url, cc::switches::kShowScreenSpaceRects, cc::switches::kShowSurfaceDamageRects, cc::switches::kSlowDownRasterScaleFactor, - cc::switches::kUIDisablePartialSwap, chromeos::switches::kConsumerDeviceManagementUrl, chromeos::switches::kDbusStub, chromeos::switches::kDbusUnstubClients, diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc index 8b96d45..f6e3c31 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc @@ -1351,6 +1351,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( switches::kVModule, // Please keep these in alphabetical order. Compositor switches here should // also be added to chrome/browser/chromeos/login/chrome_restart_request.cc. + cc::switches::kDisableCachedPictureRaster, cc::switches::kDisableCompositedAntialiasing, cc::switches::kDisableMainFrameBeforeActivation, cc::switches::kDisableThreadedAnimation, diff --git a/content/public/common/content_switches.cc b/content/public/common/content_switches.cc index ace7157..6497faf 100644 --- a/content/public/common/content_switches.cc +++ b/content/public/common/content_switches.cc @@ -83,10 +83,6 @@ const char kDisableBackingStoreLimit[] = "disable-backing-store-limit"; // features. const char kDisableBlinkFeatures[] = "disable-blink-features"; -// Disable the creation of compositing layers when it would prevent LCD text. -const char kDisablePreferCompositingToLCDText[] = - "disable-prefer-compositing-to-lcd-text"; - // Disables HTML5 DB support. const char kDisableDatabases[] = "disable-databases"; @@ -216,6 +212,10 @@ const char kDisablePinch[] = "disable-pinch"; // --extra-plugin-dir and --load-plugin switches. const char kDisablePluginsDiscovery[] = "disable-plugins-discovery"; +// Disable the creation of compositing layers when it would prevent LCD text. +const char kDisablePreferCompositingToLCDText[] = + "disable-prefer-compositing-to-lcd-text"; + // Disables the Presentation API. const char kDisablePresentationAPI[] = "disable-presentation-api"; diff --git a/content/public/common/content_switches.h b/content/public/common/content_switches.h index 5d47e85..32a67e0 100644 --- a/content/public/common/content_switches.h +++ b/content/public/common/content_switches.h @@ -34,7 +34,6 @@ CONTENT_EXPORT extern const char kDisableAcceleratedJpegDecoding[]; CONTENT_EXPORT extern const char kDisableAcceleratedMjpegDecode[]; CONTENT_EXPORT extern const char kDisableAcceleratedVideoDecode[]; extern const char kDisableBackingStoreLimit[]; -CONTENT_EXPORT extern const char kDisablePreferCompositingToLCDText[]; CONTENT_EXPORT extern const char kDisableDatabases[]; CONTENT_EXPORT extern const char kDisableDelayAgnosticAec[]; extern const char kDisableDirectNPAPIRequests[]; @@ -60,6 +59,7 @@ CONTENT_EXPORT extern const char kDisableHangMonitor[]; CONTENT_EXPORT extern const char kDisableHideInactiveStackedTabCloseButtons[]; extern const char kDisableHistogramCustomizer[]; CONTENT_EXPORT extern const char kDisableLCDText[]; +CONTENT_EXPORT extern const char kDisablePreferCompositingToLCDText[]; CONTENT_EXPORT extern const char kEnablePrefixedEncryptedMedia[]; extern const char kDisableKillAfterBadIPC[]; CONTENT_EXPORT extern const char kDisableLocalStorage[]; diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc index e648c8a..cab5d6e 100644 --- a/ui/compositor/compositor.cc +++ b/ui/compositor/compositor.cc @@ -109,7 +109,7 @@ Compositor::Compositor(ui::ContextFactory* context_factory, } } settings.renderer_settings.partial_swap_enabled = - !command_line->HasSwitch(cc::switches::kUIDisablePartialSwap); + !command_line->HasSwitch(switches::kUIDisablePartialSwap); #if defined(OS_WIN) settings.renderer_settings.finish_rendering_on_resize = true; #endif diff --git a/ui/compositor/compositor_switches.cc b/ui/compositor/compositor_switches.cc index 8a5fb98..113cd5e 100644 --- a/ui/compositor/compositor_switches.cc +++ b/ui/compositor/compositor_switches.cc @@ -15,6 +15,9 @@ const char kEnableHardwareOverlays[] = "enable-hardware-overlays"; // Forces tests to produce pixel output when they normally wouldn't. const char kEnablePixelOutputInTests[] = "enable-pixel-output-in-tests"; +// Disable partial swap which is needed for some OpenGL drivers / emulators. +const char kUIDisablePartialSwap[] = "ui-disable-partial-swap"; + const char kUIEnableCompositorAnimationTimelines[] = "ui-enable-compositor-animation-timelines"; diff --git a/ui/compositor/compositor_switches.h b/ui/compositor/compositor_switches.h index 683f055..d2fd68c 100644 --- a/ui/compositor/compositor_switches.h +++ b/ui/compositor/compositor_switches.h @@ -11,6 +11,7 @@ namespace switches { COMPOSITOR_EXPORT extern const char kEnableHardwareOverlays[]; COMPOSITOR_EXPORT extern const char kEnablePixelOutputInTests[]; +COMPOSITOR_EXPORT extern const char kUIDisablePartialSwap[]; COMPOSITOR_EXPORT extern const char kUIEnableCompositorAnimationTimelines[]; COMPOSITOR_EXPORT extern const char kUIEnableRGBA4444Textures[]; COMPOSITOR_EXPORT extern const char kUIEnableZeroCopy[]; |