Commit a9634625 authored by Christopher Cameron's avatar Christopher Cameron Committed by Commit Bot

Rasterize ui::Compositor to sRGB

The UI theme images will miss color conversion caching, resulting in
repeated conversions and poor performance.

Bug: 769677
Change-Id: Icfeafb9c9418cf03bfbfaae62cf98c5ad07e0f6d
Reviewed-on: https://chromium-review.googlesource.com/806641Reviewed-by: default avatarvmpstr <vmpstr@chromium.org>
Reviewed-by: default avatarccameron <ccameron@chromium.org>
Commit-Queue: ccameron <ccameron@chromium.org>
Cr-Commit-Position: refs/heads/master@{#521465}
parent 41dceea1
...@@ -365,7 +365,11 @@ void Compositor::SetScaleAndSize(float scale, ...@@ -365,7 +365,11 @@ void Compositor::SetScaleAndSize(float scale,
void Compositor::SetDisplayColorSpace(const gfx::ColorSpace& color_space) { void Compositor::SetDisplayColorSpace(const gfx::ColorSpace& color_space) {
output_color_space_ = color_space; output_color_space_ = color_space;
blending_color_space_ = output_color_space_.GetBlendingColorSpace(); blending_color_space_ = output_color_space_.GetBlendingColorSpace();
host_->SetRasterColorSpace(output_color_space_.GetRasterColorSpace()); // Do all ui::Compositor rasterization to sRGB because UI resources will not
// have their color conversion results cached, and will suffer repeated
// image color conversions.
// https://crbug.com/769677
host_->SetRasterColorSpace(gfx::ColorSpace::CreateSRGB());
// Color space is reset when the output surface is lost, so this must also be // Color space is reset when the output surface is lost, so this must also be
// updated then. // updated then.
// TODO(fsamuel): Get rid of this. // TODO(fsamuel): Get rid of this.
......
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