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

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

Issue 2102203003: Color: Plumb color profile from ui::Compositor to cc::DirectRenderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix ozone build Created 4 years, 5 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
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 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 context_factory_->ResizeDisplay(this, size_in_pixel); 309 context_factory_->ResizeDisplay(this, size_in_pixel);
310 } 310 }
311 if (device_scale_factor_ != scale) { 311 if (device_scale_factor_ != scale) {
312 device_scale_factor_ = scale; 312 device_scale_factor_ = scale;
313 host_->SetDeviceScaleFactor(scale); 313 host_->SetDeviceScaleFactor(scale);
314 if (root_layer_) 314 if (root_layer_)
315 root_layer_->OnDeviceScaleFactorChanged(scale); 315 root_layer_->OnDeviceScaleFactorChanged(scale);
316 } 316 }
317 } 317 }
318 318
319 void Compositor::SetDisplayColorProfile(
320 const gfx::ColorProfile& color_profile) {
321 context_factory_->SetDisplayColorProfile(this, color_profile);
322 }
323
319 void Compositor::SetBackgroundColor(SkColor color) { 324 void Compositor::SetBackgroundColor(SkColor color) {
320 host_->set_background_color(color); 325 host_->set_background_color(color);
321 ScheduleDraw(); 326 ScheduleDraw();
322 } 327 }
323 328
324 void Compositor::SetVisible(bool visible) { 329 void Compositor::SetVisible(bool visible) {
325 host_->SetVisible(visible); 330 host_->SetVisible(visible);
326 } 331 }
327 332
328 bool Compositor::IsVisible() { 333 bool Compositor::IsVisible() {
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 observer_list_, 501 observer_list_,
497 OnCompositingLockStateChanged(this)); 502 OnCompositingLockStateChanged(this));
498 } 503 }
499 504
500 void Compositor::CancelCompositorLock() { 505 void Compositor::CancelCompositorLock() {
501 if (compositor_lock_) 506 if (compositor_lock_)
502 compositor_lock_->CancelLock(); 507 compositor_lock_->CancelLock();
503 } 508 }
504 509
505 } // namespace ui 510 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698