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

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: Rebase on top of s/ColorProfile/ColorSpace/ 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
« no previous file with comments | « ui/compositor/compositor.h ('k') | ui/compositor/test/in_process_context_factory.h » ('j') | 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 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::SetDisplayColorSpace(const gfx::ColorSpace& color_space) {
320 context_factory_->SetDisplayColorSpace(this, color_space);
321 }
322
319 void Compositor::SetBackgroundColor(SkColor color) { 323 void Compositor::SetBackgroundColor(SkColor color) {
320 host_->set_background_color(color); 324 host_->set_background_color(color);
321 ScheduleDraw(); 325 ScheduleDraw();
322 } 326 }
323 327
324 void Compositor::SetVisible(bool visible) { 328 void Compositor::SetVisible(bool visible) {
325 host_->SetVisible(visible); 329 host_->SetVisible(visible);
326 } 330 }
327 331
328 bool Compositor::IsVisible() { 332 bool Compositor::IsVisible() {
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 observer_list_, 500 observer_list_,
497 OnCompositingLockStateChanged(this)); 501 OnCompositingLockStateChanged(this));
498 } 502 }
499 503
500 void Compositor::CancelCompositorLock() { 504 void Compositor::CancelCompositorLock() {
501 if (compositor_lock_) 505 if (compositor_lock_)
502 compositor_lock_->CancelLock(); 506 compositor_lock_->CancelLock();
503 } 507 }
504 508
505 } // namespace ui 509 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/compositor.h ('k') | ui/compositor/test/in_process_context_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698