Commit 2b23a291 authored by Chris Blume's avatar Chris Blume Committed by Commit Bot

Do not prefer raster in sRGB in WebView

Previously, the raster color space was set to prefer raster in sRGB
for Android. However, this is not desirable for WebView, which should
prefer raster in whatever color space the app is using. That was
already being done and was overwritten by the preference of sRGB.

This CL prevents preferring raster in sRGB when using WebView.

Bug: 955158
Change-Id: I316e646bc7ebac309fa609c2c30a5efa8e6c3650
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2116560Reviewed-by: default avatarKhushal <khushalsagar@chromium.org>
Reviewed-by: default avatarJonathan Ross <jonross@chromium.org>
Reviewed-by: default avatarBo <boliu@chromium.org>
Commit-Queue: Chris Blume <cblume@chromium.org>
Cr-Commit-Position: refs/heads/master@{#757136}
parent 3978400d
......@@ -219,6 +219,8 @@ bool AwMainDelegate::BasicStartupComplete(int* exit_code) {
features.DisableIfNotSet(::features::kWebXrHitTest);
features.DisableIfNotSet(::features::kDynamicColorGamut);
// De-jelly is never supported on WebView.
features.EnableIfNotSet(::features::kDisableDeJelly);
......
......@@ -2687,8 +2687,10 @@ cc::LayerTreeSettings RenderWidget::GenerateLayerTreeSettings(
!cmd.HasSwitch(cc::switches::kDisableCheckerImaging) && is_threaded;
#if defined(OS_ANDROID)
if (!viz::AlwaysUseWideColorGamut())
settings.prefer_raster_in_srgb = true;
// WebView should always raster in the default color space.
// Synchronous compositing indicates WebView.
if (!compositor_deps->UsingSynchronousCompositing())
settings.prefer_raster_in_srgb = features::IsDynamicColorGamutEnabled();
// We can use a more aggressive limit on Android since decodes tend to take
// longer on these devices.
......
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