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

Side by Side Diff: ui/compositor/compositor.cc

Issue 2336853002: cc: Plumb device color space through to rasterization (Closed)
Patch Set: Remove damage 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 unified diff | Download patch
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/compositor/compositor.h" 5 #include "ui/compositor/compositor.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <deque> 10 #include <deque>
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 } 333 }
334 if (device_scale_factor_ != scale) { 334 if (device_scale_factor_ != scale) {
335 device_scale_factor_ = scale; 335 device_scale_factor_ = scale;
336 host_->GetLayerTree()->SetDeviceScaleFactor(scale); 336 host_->GetLayerTree()->SetDeviceScaleFactor(scale);
337 if (root_layer_) 337 if (root_layer_)
338 root_layer_->OnDeviceScaleFactorChanged(scale); 338 root_layer_->OnDeviceScaleFactorChanged(scale);
339 } 339 }
340 } 340 }
341 341
342 void Compositor::SetDisplayColorSpace(const gfx::ColorSpace& color_space) { 342 void Compositor::SetDisplayColorSpace(const gfx::ColorSpace& color_space) {
343 host_->GetLayerTree()->SetDeviceColorSpace(color_space);
343 color_space_ = color_space; 344 color_space_ = color_space;
344 // Color space is reset when the output surface is lost, so this must also be 345 // Color space is reset when the output surface is lost, so this must also be
345 // updated then. 346 // updated then.
346 context_factory_->SetDisplayColorSpace(this, color_space_); 347 context_factory_->SetDisplayColorSpace(this, color_space_);
347 } 348 }
348 349
349 void Compositor::SetBackgroundColor(SkColor color) { 350 void Compositor::SetBackgroundColor(SkColor color) {
350 host_->GetLayerTree()->set_background_color(color); 351 host_->GetLayerTree()->set_background_color(color);
351 ScheduleDraw(); 352 ScheduleDraw();
352 } 353 }
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 observer_list_, 552 observer_list_,
552 OnCompositingLockStateChanged(this)); 553 OnCompositingLockStateChanged(this));
553 } 554 }
554 555
555 void Compositor::CancelCompositorLock() { 556 void Compositor::CancelCompositorLock() {
556 if (compositor_lock_) 557 if (compositor_lock_)
557 compositor_lock_->CancelLock(); 558 compositor_lock_->CancelLock();
558 } 559 }
559 560
560 } // namespace ui 561 } // namespace ui
OLDNEW
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698