Commit ea5c2db1 authored by Chris Blume's avatar Chris Blume Committed by Commit Bot

Add Andtroid Q gate to wide color gamut

Right now, we first check if the user is in the enabled feature group when
enabling wide color gamut. After that, we check if they are on a version
of Android that supports wide color gamut. This results in users in the
enabled group who aren't actually seeing wide colors.

This CL checks if the user is on a supported version of Android before
checking which group they are in. That should give us more accurate
results when looking at the effect of the experiment.

Bug: 1136572
Change-Id: Ied060b1036bba67a0c90a45f1f8e1dc106af4aea
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2462218
Commit-Queue: Chris Blume <cblume@chromium.org>
Commit-Queue: Khushal <khushalsagar@chromium.org>
Reviewed-by: default avatarKhushal <khushalsagar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#815324}
parent d357f705
...@@ -121,6 +121,9 @@ bool IsUsingSkiaRenderer() { ...@@ -121,6 +121,9 @@ bool IsUsingSkiaRenderer() {
bool IsDynamicColorGamutEnabled() { bool IsDynamicColorGamutEnabled() {
if (viz::AlwaysUseWideColorGamut()) if (viz::AlwaysUseWideColorGamut())
return false; return false;
auto* build_info = base::android::BuildInfo::GetInstance();
if (!build_info->is_at_least_q())
return false;
return base::FeatureList::IsEnabled(kDynamicColorGamut); return base::FeatureList::IsEnabled(kDynamicColorGamut);
} }
#endif #endif
......
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