Commit 920c0ed0 authored by Fady Samuel's avatar Fady Samuel Committed by Commit Bot

Surface Synchronization: DeviceScaleFactor plumbed alongside Viewport

This CL ensures that device scale factor is plumbed alongside the viewport
size from commit time through pending and then the active trees.

In a subsequent CL, I will introduce diagnostic checks that verify that
if device scale factor and viewport change, then the LocalSurfaceId must
also change.

Bug: 672962
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Ica059593c9890609deb76ad44e1e58e0ff30edbd
Reviewed-on: https://chromium-review.googlesource.com/1159115Reviewed-by: default avatarPhilip Rogers <pdr@chromium.org>
Reviewed-by: default avatarenne <enne@chromium.org>
Commit-Queue: Fady Samuel <fsamuel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579948}
parent e200eb07
......@@ -330,10 +330,6 @@ void LayerTreeHost::FinishCommitOnImplThread(
sync_tree->PassSwapPromises(swap_promise_manager_.TakeSwapPromises());
// TODO(pdr): Move this into PushPropertyTreesTo or introduce a lifecycle
// state for it.
sync_tree->SetDeviceScaleFactor(device_scale_factor_);
sync_tree->set_ui_resource_request_queue(
ui_resource_manager_->TakeUIResourcesRequests());
......@@ -1429,19 +1425,20 @@ void LayerTreeHost::PushLayerTreePropertiesTo(LayerTreeImpl* tree_impl) {
if (tree_impl->IsActiveTree())
tree_impl->elastic_overscroll()->PushPendingToActive();
tree_impl->set_painted_device_scale_factor(painted_device_scale_factor_);
tree_impl->SetRasterColorSpace(raster_color_space_id_, raster_color_space_);
tree_impl->set_content_source_id(content_source_id_);
tree_impl->set_painted_device_scale_factor(painted_device_scale_factor_);
tree_impl->SetDeviceScaleFactor(device_scale_factor_);
tree_impl->SetDeviceViewportSize(device_viewport_size_);
tree_impl->SetViewportVisibleRect(viewport_visible_rect_);
if (TakeNewLocalSurfaceIdRequest())
tree_impl->RequestNewLocalSurfaceId();
tree_impl->SetLocalSurfaceIdFromParent(local_surface_id_from_parent_);
has_pushed_local_surface_id_from_parent_ = true;
tree_impl->SetDeviceViewportSize(device_viewport_size_);
tree_impl->SetViewportVisibleRect(viewport_visible_rect_);
if (pending_page_scale_animation_) {
tree_impl->SetPendingPageScaleAnimation(
......
......@@ -465,18 +465,20 @@ void LayerTreeImpl::PushPropertiesTo(LayerTreeImpl* target_tree) {
// tree so only the limits need to be provided.
target_tree->PushPageScaleFactorAndLimits(nullptr, min_page_scale_factor(),
max_page_scale_factor());
target_tree->SetDeviceScaleFactor(device_scale_factor());
target_tree->set_painted_device_scale_factor(painted_device_scale_factor());
target_tree->SetRasterColorSpace(raster_color_space_id_, raster_color_space_);
target_tree->elastic_overscroll()->PushPendingToActive();
target_tree->set_content_source_id(content_source_id());
target_tree->set_painted_device_scale_factor(painted_device_scale_factor());
target_tree->SetDeviceScaleFactor(device_scale_factor());
target_tree->SetDeviceViewportSize(device_viewport_size_);
target_tree->SetViewportVisibleRect(viewport_visible_rect_);
if (TakeNewLocalSurfaceIdRequest())
target_tree->RequestNewLocalSurfaceId();
target_tree->SetLocalSurfaceIdFromParent(local_surface_id_from_parent());
target_tree->SetDeviceViewportSize(device_viewport_size_);
target_tree->SetViewportVisibleRect(viewport_visible_rect_);
target_tree->pending_page_scale_animation_ =
std::move(pending_page_scale_animation_);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment