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

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

Issue 2445093002: cc/blimp: Add synchronization for scroll/scale state. (Closed)
Patch Set: Addressed comments Created 4 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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.h" 5 #include "cc/trees/layer_tree.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "cc/animation/animation_host.h" 9 #include "cc/animation/animation_host.h"
10 #include "cc/input/page_scale_animation.h" 10 #include "cc/input/page_scale_animation.h"
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 tree_impl->set_painted_device_scale_factor( 416 tree_impl->set_painted_device_scale_factor(
417 inputs_.painted_device_scale_factor); 417 inputs_.painted_device_scale_factor);
418 418
419 tree_impl->SetDeviceColorSpace(inputs_.device_color_space); 419 tree_impl->SetDeviceColorSpace(inputs_.device_color_space);
420 420
421 if (inputs_.pending_page_scale_animation) { 421 if (inputs_.pending_page_scale_animation) {
422 tree_impl->SetPendingPageScaleAnimation( 422 tree_impl->SetPendingPageScaleAnimation(
423 std::move(inputs_.pending_page_scale_animation)); 423 std::move(inputs_.pending_page_scale_animation));
424 } 424 }
425 425
426 if (inputs_.reflected_main_frame_state) {
427 tree_impl->SetReflectedMainFrameState(
428 std::move(inputs_.reflected_main_frame_state));
429 }
430
426 DCHECK(!tree_impl->ViewportSizeInvalid()); 431 DCHECK(!tree_impl->ViewportSizeInvalid());
427 432
428 tree_impl->set_has_ever_been_drawn(false); 433 tree_impl->set_has_ever_been_drawn(false);
429 } 434 }
430 435
431 void LayerTree::ToProtobuf(proto::LayerTree* proto, bool inputs_only) { 436 void LayerTree::ToProtobuf(proto::LayerTree* proto, bool inputs_only) {
432 TRACE_EVENT0("cc.remote", "LayerProtoConverter::SerializeLayerHierarchy"); 437 TRACE_EVENT0("cc.remote", "LayerProtoConverter::SerializeLayerHierarchy");
433 438
434 // LayerTree::Inputs Serialization ----------------------------------------- 439 // LayerTree::Inputs Serialization -----------------------------------------
435 440
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 695
691 LayerListReverseIterator<Layer> LayerTree::rend() { 696 LayerListReverseIterator<Layer> LayerTree::rend() {
692 return LayerListReverseIterator<Layer>(nullptr); 697 return LayerListReverseIterator<Layer>(nullptr);
693 } 698 }
694 699
695 void LayerTree::SetNeedsDisplayOnAllLayers() { 700 void LayerTree::SetNeedsDisplayOnAllLayers() {
696 for (auto* layer : *this) 701 for (auto* layer : *this)
697 layer->SetNeedsDisplay(); 702 layer->SetNeedsDisplay();
698 } 703 }
699 704
705 void LayerTree::SetReflectedMainFrameState(
706 std::unique_ptr<ReflectedMainFrameState> reflected_main_frame_state) {
707 inputs_.reflected_main_frame_state = std::move(reflected_main_frame_state);
708 SetNeedsCommit();
709 }
710
700 } // namespace cc 711 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698