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

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

Issue 2810813004: Hide fullscreen rotation jank (Closed)
Patch Set: Evict frame instead of showing a black frame Created 3 years, 7 months 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 <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 scoped_refptr<SyncedProperty<ScaleGroup>> page_scale_factor, 71 scoped_refptr<SyncedProperty<ScaleGroup>> page_scale_factor,
72 scoped_refptr<SyncedBrowserControls> top_controls_shown_ratio, 72 scoped_refptr<SyncedBrowserControls> top_controls_shown_ratio,
73 scoped_refptr<SyncedElasticOverscroll> elastic_overscroll) 73 scoped_refptr<SyncedElasticOverscroll> elastic_overscroll)
74 : layer_tree_host_impl_(layer_tree_host_impl), 74 : layer_tree_host_impl_(layer_tree_host_impl),
75 source_frame_number_(-1), 75 source_frame_number_(-1),
76 is_first_frame_after_commit_tracker_(-1), 76 is_first_frame_after_commit_tracker_(-1),
77 root_layer_for_testing_(nullptr), 77 root_layer_for_testing_(nullptr),
78 hud_layer_(nullptr), 78 hud_layer_(nullptr),
79 background_color_(0), 79 background_color_(0),
80 has_transparent_background_(false), 80 has_transparent_background_(false),
81 is_fullscreen_(false),
81 last_scrolled_scroll_node_index_(ScrollTree::kInvalidNodeId), 82 last_scrolled_scroll_node_index_(ScrollTree::kInvalidNodeId),
82 page_scale_factor_(page_scale_factor), 83 page_scale_factor_(page_scale_factor),
83 min_page_scale_factor_(0), 84 min_page_scale_factor_(0),
84 max_page_scale_factor_(0), 85 max_page_scale_factor_(0),
85 device_scale_factor_(1.f), 86 device_scale_factor_(1.f),
86 painted_device_scale_factor_(1.f), 87 painted_device_scale_factor_(1.f),
87 content_source_id_(0), 88 content_source_id_(0),
88 elastic_overscroll_(elastic_overscroll), 89 elastic_overscroll_(elastic_overscroll),
89 layers_(new OwnedLayerImplList), 90 layers_(new OwnedLayerImplList),
90 viewport_size_invalid_(false), 91 viewport_size_invalid_(false),
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 target_tree->pending_page_scale_animation_ = 463 target_tree->pending_page_scale_animation_ =
463 std::move(pending_page_scale_animation_); 464 std::move(pending_page_scale_animation_);
464 465
465 target_tree->RegisterSelection(selection_); 466 target_tree->RegisterSelection(selection_);
466 467
467 // This should match the property synchronization in 468 // This should match the property synchronization in
468 // LayerTreeHost::finishCommitOnImplThread(). 469 // LayerTreeHost::finishCommitOnImplThread().
469 target_tree->set_source_frame_number(source_frame_number()); 470 target_tree->set_source_frame_number(source_frame_number());
470 target_tree->set_background_color(background_color()); 471 target_tree->set_background_color(background_color());
471 target_tree->set_has_transparent_background(has_transparent_background()); 472 target_tree->set_has_transparent_background(has_transparent_background());
473 target_tree->set_is_fullscreen(is_fullscreen());
472 target_tree->set_have_scroll_event_handlers(have_scroll_event_handlers()); 474 target_tree->set_have_scroll_event_handlers(have_scroll_event_handlers());
473 target_tree->set_event_listener_properties( 475 target_tree->set_event_listener_properties(
474 EventListenerClass::kTouchStartOrMove, 476 EventListenerClass::kTouchStartOrMove,
475 event_listener_properties(EventListenerClass::kTouchStartOrMove)); 477 event_listener_properties(EventListenerClass::kTouchStartOrMove));
476 target_tree->set_event_listener_properties( 478 target_tree->set_event_listener_properties(
477 EventListenerClass::kMouseWheel, 479 EventListenerClass::kMouseWheel,
478 event_listener_properties(EventListenerClass::kMouseWheel)); 480 event_listener_properties(EventListenerClass::kMouseWheel));
479 target_tree->set_event_listener_properties( 481 target_tree->set_event_listener_properties(
480 EventListenerClass::kTouchEndOrCancel, 482 EventListenerClass::kTouchEndOrCancel,
481 event_listener_properties(EventListenerClass::kTouchEndOrCancel)); 483 event_listener_properties(EventListenerClass::kTouchEndOrCancel));
(...skipping 1640 matching lines...) Expand 10 before | Expand all | Expand 10 after
2122 2124
2123 void LayerTreeImpl::ResetAllChangeTracking() { 2125 void LayerTreeImpl::ResetAllChangeTracking() {
2124 layers_that_should_push_properties_.clear(); 2126 layers_that_should_push_properties_.clear();
2125 // Iterate over all layers, including masks. 2127 // Iterate over all layers, including masks.
2126 for (auto& layer : *layers_) 2128 for (auto& layer : *layers_)
2127 layer->ResetChangeTracking(); 2129 layer->ResetChangeTracking();
2128 property_trees_.ResetAllChangeTracking(); 2130 property_trees_.ResetAllChangeTracking();
2129 } 2131 }
2130 2132
2131 } // namespace cc 2133 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698