OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |