Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(874)

Unified Diff: ui/compositor/compositor.cc

Issue 2307083003: Send the ICC profile to the compositor under aura. (Closed)
Patch Set: comment updates Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/compositor/compositor.cc
diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc
index a08204f612aeabd79e75fb50544840835788f396..7e5b88be7e51640d9de66ecb44310502e9ba2ca9 100644
--- a/ui/compositor/compositor.cc
+++ b/ui/compositor/compositor.cc
@@ -268,9 +268,10 @@ void Compositor::SetOutputSurface(
std::unique_ptr<cc::OutputSurface> output_surface) {
output_surface_requested_ = false;
host_->SetOutputSurface(std::move(output_surface));
- // Visibility is reset when the output surface is lost, so update it to match
- // the Compositor's.
+ // Display properties are reset when the output surface is lost, so update it
+ // to match the Compositor's.
context_factory_->SetDisplayVisible(this, host_->visible());
+ context_factory_->SetDisplayColorSpace(this, color_space_);
}
void Compositor::ScheduleDraw() {
@@ -340,7 +341,10 @@ void Compositor::SetScaleAndSize(float scale, const gfx::Size& size_in_pixel) {
}
void Compositor::SetDisplayColorSpace(const gfx::ColorSpace& color_space) {
- context_factory_->SetDisplayColorSpace(this, color_space);
+ color_space_ = color_space;
+ // Color space is reset when the output surface is lost, so this must also be
+ // updated then.
+ context_factory_->SetDisplayColorSpace(this, color_space_);
}
void Compositor::SetBackgroundColor(SkColor color) {
« content/browser/renderer_host/render_widget_host_view_aura.cc ('K') | « ui/compositor/compositor.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698