Index: ui/compositor/compositor.cc |
diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc |
index f0c88887bd3ff29000de140971798002e858e8c6..bc61e1d67dd86cf8b7d446b764309922a00e71f4 100644 |
--- a/ui/compositor/compositor.cc |
+++ b/ui/compositor/compositor.cc |
@@ -60,6 +60,7 @@ Compositor::Compositor(const viz::FrameSinkId& frame_sink_id, |
ui::ContextFactoryPrivate* context_factory_private, |
scoped_refptr<base::SingleThreadTaskRunner> task_runner, |
bool enable_surface_synchronization, |
+ bool enable_pixel_canvas, |
bool external_begin_frames_enabled) |
: context_factory_(context_factory), |
context_factory_private_(context_factory_private), |
@@ -70,6 +71,7 @@ Compositor::Compositor(const viz::FrameSinkId& frame_sink_id, |
layer_animator_collection_(this), |
scheduled_timeout_(base::TimeTicks()), |
allow_locks_to_extend_timeout_(false), |
+ is_pixel_canvas_(enable_pixel_canvas), |
weak_ptr_factory_(this), |
lock_timeout_weak_ptr_factory_(this) { |
if (context_factory_private) { |
@@ -334,6 +336,8 @@ void Compositor::SetScaleAndSize(float scale, const gfx::Size& size_in_pixel) { |
if (device_scale_factor_ != scale) { |
device_scale_factor_ = scale; |
host_->SetDeviceScaleFactor(scale); |
+ if (is_pixel_canvas()) |
+ host_->SetRecordingScaleFactor(scale); |
if (root_layer_) |
root_layer_->OnDeviceScaleFactorChanged(scale); |
} |