| 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 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 } | 332 } |
| 333 if (device_scale_factor_ != scale) { | 333 if (device_scale_factor_ != scale) { |
| 334 device_scale_factor_ = scale; | 334 device_scale_factor_ = scale; |
| 335 host_->GetLayerTree()->SetDeviceScaleFactor(scale); | 335 host_->GetLayerTree()->SetDeviceScaleFactor(scale); |
| 336 if (root_layer_) | 336 if (root_layer_) |
| 337 root_layer_->OnDeviceScaleFactorChanged(scale); | 337 root_layer_->OnDeviceScaleFactorChanged(scale); |
| 338 } | 338 } |
| 339 } | 339 } |
| 340 | 340 |
| 341 void Compositor::SetDisplayColorSpace(const gfx::ColorSpace& color_space) { | 341 void Compositor::SetDisplayColorSpace(const gfx::ColorSpace& color_space) { |
| 342 host_->GetLayerTree()->SetDeviceColorSpace(color_space); |
| 342 context_factory_->SetDisplayColorSpace(this, color_space); | 343 context_factory_->SetDisplayColorSpace(this, color_space); |
| 343 } | 344 } |
| 344 | 345 |
| 345 void Compositor::SetBackgroundColor(SkColor color) { | 346 void Compositor::SetBackgroundColor(SkColor color) { |
| 346 host_->GetLayerTree()->set_background_color(color); | 347 host_->GetLayerTree()->set_background_color(color); |
| 347 ScheduleDraw(); | 348 ScheduleDraw(); |
| 348 } | 349 } |
| 349 | 350 |
| 350 void Compositor::SetVisible(bool visible) { | 351 void Compositor::SetVisible(bool visible) { |
| 351 host_->SetVisible(visible); | 352 host_->SetVisible(visible); |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 547 observer_list_, | 548 observer_list_, |
| 548 OnCompositingLockStateChanged(this)); | 549 OnCompositingLockStateChanged(this)); |
| 549 } | 550 } |
| 550 | 551 |
| 551 void Compositor::CancelCompositorLock() { | 552 void Compositor::CancelCompositorLock() { |
| 552 if (compositor_lock_) | 553 if (compositor_lock_) |
| 553 compositor_lock_->CancelLock(); | 554 compositor_lock_->CancelLock(); |
| 554 } | 555 } |
| 555 | 556 |
| 556 } // namespace ui | 557 } // namespace ui |
| OLD | NEW |