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

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

Issue 1783613004: CC Animation: Erase cc::LayerSettings everywhere. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@eraseandroid
Patch Set: Rebase. Created 4 years, 9 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
« no previous file with comments | « cc/tiles/tile_manager_unittest.cc ('k') | cc/trees/layer_tree_host_common_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_host.h" 5 #include "cc/trees/layer_tree_host.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 19 matching lines...) Expand all
30 #include "cc/debug/devtools_instrumentation.h" 30 #include "cc/debug/devtools_instrumentation.h"
31 #include "cc/debug/frame_viewer_instrumentation.h" 31 #include "cc/debug/frame_viewer_instrumentation.h"
32 #include "cc/debug/rendering_stats_instrumentation.h" 32 #include "cc/debug/rendering_stats_instrumentation.h"
33 #include "cc/input/layer_selection_bound.h" 33 #include "cc/input/layer_selection_bound.h"
34 #include "cc/input/page_scale_animation.h" 34 #include "cc/input/page_scale_animation.h"
35 #include "cc/layers/heads_up_display_layer.h" 35 #include "cc/layers/heads_up_display_layer.h"
36 #include "cc/layers/heads_up_display_layer_impl.h" 36 #include "cc/layers/heads_up_display_layer_impl.h"
37 #include "cc/layers/layer.h" 37 #include "cc/layers/layer.h"
38 #include "cc/layers/layer_iterator.h" 38 #include "cc/layers/layer_iterator.h"
39 #include "cc/layers/layer_proto_converter.h" 39 #include "cc/layers/layer_proto_converter.h"
40 #include "cc/layers/layer_settings.h"
41 #include "cc/layers/painted_scrollbar_layer.h" 40 #include "cc/layers/painted_scrollbar_layer.h"
42 #include "cc/proto/gfx_conversions.h" 41 #include "cc/proto/gfx_conversions.h"
43 #include "cc/proto/layer_tree_host.pb.h" 42 #include "cc/proto/layer_tree_host.pb.h"
44 #include "cc/resources/ui_resource_request.h" 43 #include "cc/resources/ui_resource_request.h"
45 #include "cc/scheduler/begin_frame_source.h" 44 #include "cc/scheduler/begin_frame_source.h"
46 #include "cc/trees/draw_property_utils.h" 45 #include "cc/trees/draw_property_utils.h"
47 #include "cc/trees/layer_tree_host_client.h" 46 #include "cc/trees/layer_tree_host_client.h"
48 #include "cc/trees/layer_tree_host_common.h" 47 #include "cc/trees/layer_tree_host_common.h"
49 #include "cc/trees/layer_tree_host_impl.h" 48 #include "cc/trees/layer_tree_host_impl.h"
50 #include "cc/trees/layer_tree_impl.h" 49 #include "cc/trees/layer_tree_impl.h"
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 } 502 }
504 503
505 void LayerTreeHost::WillCommit() { 504 void LayerTreeHost::WillCommit() {
506 OnCommitForSwapPromises(); 505 OnCommitForSwapPromises();
507 client_->WillCommit(); 506 client_->WillCommit();
508 } 507 }
509 508
510 void LayerTreeHost::UpdateHudLayer() { 509 void LayerTreeHost::UpdateHudLayer() {
511 if (debug_state_.ShowHudInfo()) { 510 if (debug_state_.ShowHudInfo()) {
512 if (!hud_layer_.get()) { 511 if (!hud_layer_.get()) {
513 LayerSettings hud_layer_settings; 512 hud_layer_ = HeadsUpDisplayLayer::Create();
514 hud_layer_settings.use_compositor_animation_timelines =
515 settings_.use_compositor_animation_timelines;
516 hud_layer_ = HeadsUpDisplayLayer::Create(hud_layer_settings);
517 } 513 }
518 514
519 if (root_layer_.get() && !hud_layer_->parent()) 515 if (root_layer_.get() && !hud_layer_->parent())
520 root_layer_->AddChild(hud_layer_); 516 root_layer_->AddChild(hud_layer_);
521 } else if (hud_layer_.get()) { 517 } else if (hud_layer_.get()) {
522 hud_layer_->RemoveFromParent(); 518 hud_layer_->RemoveFromParent();
523 hud_layer_ = NULL; 519 hud_layer_ = NULL;
524 } 520 }
525 } 521 }
526 522
(...skipping 1067 matching lines...) Expand 10 before | Expand all | Expand 10 after
1594 LayerTreeHostCommon::CallFunctionForSubtree( 1590 LayerTreeHostCommon::CallFunctionForSubtree(
1595 root_layer(), [seq_num](Layer* layer) { 1591 root_layer(), [seq_num](Layer* layer) {
1596 layer->set_property_tree_sequence_number(seq_num); 1592 layer->set_property_tree_sequence_number(seq_num);
1597 }); 1593 });
1598 1594
1599 surface_id_namespace_ = proto.surface_id_namespace(); 1595 surface_id_namespace_ = proto.surface_id_namespace();
1600 next_surface_sequence_ = proto.next_surface_sequence(); 1596 next_surface_sequence_ = proto.next_surface_sequence();
1601 } 1597 }
1602 1598
1603 } // namespace cc 1599 } // namespace cc
OLDNEW
« no previous file with comments | « cc/tiles/tile_manager_unittest.cc ('k') | cc/trees/layer_tree_host_common_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698