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 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 size_ = size_in_pixel; | 304 size_ = size_in_pixel; |
305 host_->SetViewportSize(size_in_pixel); | 305 host_->SetViewportSize(size_in_pixel); |
306 root_web_layer_->SetBounds(size_in_pixel); | 306 root_web_layer_->SetBounds(size_in_pixel); |
307 // TODO(fsamuel): Get rid of ContextFactoryPrivate. | 307 // TODO(fsamuel): Get rid of ContextFactoryPrivate. |
308 if (context_factory_private_) | 308 if (context_factory_private_) |
309 context_factory_private_->ResizeDisplay(this, size_in_pixel); | 309 context_factory_private_->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 (IsPixelCanvasRecordingEnabled()) |
| 315 host_->SetRecordingScaleFactor(scale); |
314 if (root_layer_) | 316 if (root_layer_) |
315 root_layer_->OnDeviceScaleFactorChanged(scale); | 317 root_layer_->OnDeviceScaleFactorChanged(scale); |
316 } | 318 } |
317 } | 319 } |
318 | 320 |
319 void Compositor::SetDisplayColorSpace(const gfx::ColorSpace& color_space) { | 321 void Compositor::SetDisplayColorSpace(const gfx::ColorSpace& color_space) { |
320 blending_color_space_ = color_space; | 322 blending_color_space_ = color_space; |
321 output_color_space_ = blending_color_space_; | 323 output_color_space_ = blending_color_space_; |
322 if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableHDR)) { | 324 if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableHDR)) { |
323 blending_color_space_ = gfx::ColorSpace::CreateExtendedSRGB(); | 325 blending_color_space_ = gfx::ColorSpace::CreateExtendedSRGB(); |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
569 void Compositor::TimeoutLocks() { | 571 void Compositor::TimeoutLocks() { |
570 // Make a copy, we're going to cause |active_locks_| to become | 572 // Make a copy, we're going to cause |active_locks_| to become |
571 // empty. | 573 // empty. |
572 std::vector<CompositorLock*> locks = active_locks_; | 574 std::vector<CompositorLock*> locks = active_locks_; |
573 for (auto* lock : locks) | 575 for (auto* lock : locks) |
574 lock->TimeoutLock(); | 576 lock->TimeoutLock(); |
575 DCHECK(active_locks_.empty()); | 577 DCHECK(active_locks_.empty()); |
576 } | 578 } |
577 | 579 |
578 } // namespace ui | 580 } // namespace ui |
OLD | NEW |