| 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 1136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1147 // If we did not SavePaintProperties() for the layer this frame, then push the | 1147 // If we did not SavePaintProperties() for the layer this frame, then push the |
| 1148 // real property values, not the paint property values. | 1148 // real property values, not the paint property values. |
| 1149 bool use_paint_properties = paint_properties_.source_frame_number == | 1149 bool use_paint_properties = paint_properties_.source_frame_number == |
| 1150 layer_tree_host_->source_frame_number(); | 1150 layer_tree_host_->source_frame_number(); |
| 1151 | 1151 |
| 1152 layer->SetTransformOrigin(transform_origin_); | 1152 layer->SetTransformOrigin(transform_origin_); |
| 1153 layer->SetBackgroundColor(background_color_); | 1153 layer->SetBackgroundColor(background_color_); |
| 1154 layer->SetBounds(use_paint_properties ? paint_properties_.bounds | 1154 layer->SetBounds(use_paint_properties ? paint_properties_.bounds |
| 1155 : bounds_); | 1155 : bounds_); |
| 1156 layer->SetContentsScale(1.f, 1.f); | 1156 layer->SetContentsScale(1.f, 1.f); |
| 1157 layer->SetContentBounds(bounds()); | |
| 1158 | 1157 |
| 1159 if (frame_viewer_instrumentation::IsTracingLayerTreeSnapshots()) | 1158 if (frame_viewer_instrumentation::IsTracingLayerTreeSnapshots()) |
| 1160 layer->SetDebugInfo(TakeDebugInfo()); | 1159 layer->SetDebugInfo(TakeDebugInfo()); |
| 1161 | 1160 |
| 1162 layer->SetTransformTreeIndex(transform_tree_index()); | 1161 layer->SetTransformTreeIndex(transform_tree_index()); |
| 1163 layer->SetOpacityTreeIndex(opacity_tree_index()); | 1162 layer->SetOpacityTreeIndex(opacity_tree_index()); |
| 1164 layer->SetClipTreeIndex(clip_tree_index()); | 1163 layer->SetClipTreeIndex(clip_tree_index()); |
| 1165 layer->set_offset_to_transform_parent(offset_to_transform_parent_); | 1164 layer->set_offset_to_transform_parent(offset_to_transform_parent_); |
| 1166 layer->SetDoubleSided(double_sided_); | 1165 layer->SetDoubleSided(double_sided_); |
| 1167 layer->SetDrawCheckerboardForMissingTiles( | 1166 layer->SetDrawCheckerboardForMissingTiles( |
| (...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1644 ? layer_tree_host()->meta_information_sequence_number() | 1643 ? layer_tree_host()->meta_information_sequence_number() |
| 1645 : 0; | 1644 : 0; |
| 1646 } | 1645 } |
| 1647 | 1646 |
| 1648 bool Layer::sorted_for_recursion() { | 1647 bool Layer::sorted_for_recursion() { |
| 1649 return sorted_for_recursion_tracker_ == | 1648 return sorted_for_recursion_tracker_ == |
| 1650 layer_tree_host()->meta_information_sequence_number(); | 1649 layer_tree_host()->meta_information_sequence_number(); |
| 1651 } | 1650 } |
| 1652 | 1651 |
| 1653 } // namespace cc | 1652 } // namespace cc |
| OLD | NEW |