OLD | NEW |
1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 2010 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/layers/layer.h" | 5 #include "cc/layers/layer.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/atomic_sequence_num.h" | 9 #include "base/atomic_sequence_num.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 namespace cc { | 33 namespace cc { |
34 | 34 |
35 base::StaticAtomicSequenceNumber g_next_layer_id; | 35 base::StaticAtomicSequenceNumber g_next_layer_id; |
36 | 36 |
37 scoped_refptr<Layer> Layer::Create(const LayerSettings& settings) { | 37 scoped_refptr<Layer> Layer::Create(const LayerSettings& settings) { |
38 return make_scoped_refptr(new Layer(settings)); | 38 return make_scoped_refptr(new Layer(settings)); |
39 } | 39 } |
40 | 40 |
41 Layer::Layer(const LayerSettings& settings) | 41 Layer::Layer(const LayerSettings& settings) |
42 : needs_push_properties_(false), | 42 : needs_push_properties_(false), |
43 num_dependents_need_push_properties_(false), | 43 num_dependents_need_push_properties_(0), |
44 stacking_order_changed_(false), | 44 stacking_order_changed_(false), |
45 // Layer IDs start from 1. | 45 // Layer IDs start from 1. |
46 layer_id_(g_next_layer_id.GetNext() + 1), | 46 layer_id_(g_next_layer_id.GetNext() + 1), |
47 ignore_set_needs_commit_(false), | 47 ignore_set_needs_commit_(false), |
48 sorting_context_id_(0), | 48 sorting_context_id_(0), |
49 parent_(nullptr), | 49 parent_(nullptr), |
50 layer_tree_host_(nullptr), | 50 layer_tree_host_(nullptr), |
51 scroll_clip_layer_id_(INVALID_ID), | 51 scroll_clip_layer_id_(INVALID_ID), |
52 num_descendants_that_draw_content_(0), | 52 num_descendants_that_draw_content_(0), |
53 transform_tree_index_(-1), | 53 transform_tree_index_(-1), |
(...skipping 1599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1653 ? layer_tree_host()->meta_information_sequence_number() | 1653 ? layer_tree_host()->meta_information_sequence_number() |
1654 : 0; | 1654 : 0; |
1655 } | 1655 } |
1656 | 1656 |
1657 bool Layer::sorted_for_recursion() { | 1657 bool Layer::sorted_for_recursion() { |
1658 return sorted_for_recursion_tracker_ == | 1658 return sorted_for_recursion_tracker_ == |
1659 layer_tree_host()->meta_information_sequence_number(); | 1659 layer_tree_host()->meta_information_sequence_number(); |
1660 } | 1660 } |
1661 | 1661 |
1662 } // namespace cc | 1662 } // namespace cc |
OLD | NEW |