Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(111)

Side by Side Diff: cc/trees/layer_tree_impl.cc

Issue 1412663005: Introduce painted-device-scale-factor and use it when --enable-use-zoom-for-dsf is specified. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 "cc/trees/layer_tree_impl.h" 5 #include "cc/trees/layer_tree_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <set> 9 #include <set>
10 10
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 has_transparent_background_(false), 51 has_transparent_background_(false),
52 currently_scrolling_layer_id_(Layer::INVALID_ID), 52 currently_scrolling_layer_id_(Layer::INVALID_ID),
53 overscroll_elasticity_layer_id_(Layer::INVALID_ID), 53 overscroll_elasticity_layer_id_(Layer::INVALID_ID),
54 page_scale_layer_id_(Layer::INVALID_ID), 54 page_scale_layer_id_(Layer::INVALID_ID),
55 inner_viewport_scroll_layer_id_(Layer::INVALID_ID), 55 inner_viewport_scroll_layer_id_(Layer::INVALID_ID),
56 outer_viewport_scroll_layer_id_(Layer::INVALID_ID), 56 outer_viewport_scroll_layer_id_(Layer::INVALID_ID),
57 page_scale_factor_(page_scale_factor), 57 page_scale_factor_(page_scale_factor),
58 min_page_scale_factor_(0), 58 min_page_scale_factor_(0),
59 max_page_scale_factor_(0), 59 max_page_scale_factor_(0),
60 device_scale_factor_(1.f), 60 device_scale_factor_(1.f),
61 painted_device_scale_factor_(0.f),
aelias_OOO_until_Jul13 2015/10/25 00:07:11 This one should default to 1 as well.
oshima 2015/10/27 20:28:09 Done.
61 elastic_overscroll_(elastic_overscroll), 62 elastic_overscroll_(elastic_overscroll),
62 viewport_size_invalid_(false), 63 viewport_size_invalid_(false),
63 needs_update_draw_properties_(true), 64 needs_update_draw_properties_(true),
64 needs_full_tree_sync_(true), 65 needs_full_tree_sync_(true),
65 next_activation_forces_redraw_(false), 66 next_activation_forces_redraw_(false),
66 has_ever_been_drawn_(false), 67 has_ever_been_drawn_(false),
67 render_surface_layer_list_id_(0), 68 render_surface_layer_list_id_(0),
68 top_controls_shrink_blink_size_(false), 69 top_controls_shrink_blink_size_(false),
69 top_controls_height_(0), 70 top_controls_height_(0),
70 top_controls_shown_ratio_(top_controls_shown_ratio) {} 71 top_controls_shown_ratio_(top_controls_shown_ratio) {}
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 target_tree->set_top_controls_shrink_blink_size( 309 target_tree->set_top_controls_shrink_blink_size(
309 top_controls_shrink_blink_size_); 310 top_controls_shrink_blink_size_);
310 target_tree->set_top_controls_height(top_controls_height_); 311 target_tree->set_top_controls_height(top_controls_height_);
311 target_tree->PushTopControls(nullptr); 312 target_tree->PushTopControls(nullptr);
312 313
313 // Active tree already shares the page_scale_factor object with pending 314 // Active tree already shares the page_scale_factor object with pending
314 // tree so only the limits need to be provided. 315 // tree so only the limits need to be provided.
315 target_tree->PushPageScaleFactorAndLimits(nullptr, min_page_scale_factor(), 316 target_tree->PushPageScaleFactorAndLimits(nullptr, min_page_scale_factor(),
316 max_page_scale_factor()); 317 max_page_scale_factor());
317 target_tree->SetDeviceScaleFactor(device_scale_factor()); 318 target_tree->SetDeviceScaleFactor(device_scale_factor());
319 target_tree->set_painted_device_scale_factor(painted_device_scale_factor());
318 target_tree->elastic_overscroll()->PushPendingToActive(); 320 target_tree->elastic_overscroll()->PushPendingToActive();
319 321
320 target_tree->pending_page_scale_animation_ = 322 target_tree->pending_page_scale_animation_ =
321 pending_page_scale_animation_.Pass(); 323 pending_page_scale_animation_.Pass();
322 324
323 target_tree->SetViewportLayersFromIds( 325 target_tree->SetViewportLayersFromIds(
324 overscroll_elasticity_layer_id_, page_scale_layer_id_, 326 overscroll_elasticity_layer_id_, page_scale_layer_id_,
325 inner_viewport_scroll_layer_id_, outer_viewport_scroll_layer_id_); 327 inner_viewport_scroll_layer_id_, outer_viewport_scroll_layer_id_);
326 328
327 target_tree->RegisterSelection(selection_); 329 target_tree->RegisterSelection(selection_);
(...skipping 1564 matching lines...) Expand 10 before | Expand all | Expand 10 after
1892 const gfx::BoxF& box, 1894 const gfx::BoxF& box,
1893 gfx::BoxF* bounds) const { 1895 gfx::BoxF* bounds) const {
1894 *bounds = gfx::BoxF(); 1896 *bounds = gfx::BoxF();
1895 return layer_tree_host_impl_->animation_host() 1897 return layer_tree_host_impl_->animation_host()
1896 ? layer_tree_host_impl_->animation_host() 1898 ? layer_tree_host_impl_->animation_host()
1897 ->TransformAnimationBoundsForBox(layer->id(), box, bounds) 1899 ->TransformAnimationBoundsForBox(layer->id(), box, bounds)
1898 : true; 1900 : true;
1899 } 1901 }
1900 1902
1901 } // namespace cc 1903 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698