| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 1102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1113 | 1113 |
| 1114 void Layer::PushPropertiesTo(LayerImpl* layer) { | 1114 void Layer::PushPropertiesTo(LayerImpl* layer) { |
| 1115 TRACE_EVENT0("cc", "Layer::PushPropertiesTo"); | 1115 TRACE_EVENT0("cc", "Layer::PushPropertiesTo"); |
| 1116 DCHECK(layer_tree_host_); | 1116 DCHECK(layer_tree_host_); |
| 1117 | 1117 |
| 1118 // If we did not SavePaintProperties() for the layer this frame, then push the | 1118 // If we did not SavePaintProperties() for the layer this frame, then push the |
| 1119 // real property values, not the paint property values. | 1119 // real property values, not the paint property values. |
| 1120 bool use_paint_properties = paint_properties_.source_frame_number == | 1120 bool use_paint_properties = paint_properties_.source_frame_number == |
| 1121 layer_tree_host_->source_frame_number(); | 1121 layer_tree_host_->source_frame_number(); |
| 1122 | 1122 |
| 1123 layer->SetTransformOrigin(transform_origin_); | |
| 1124 layer->SetBackgroundColor(background_color_); | 1123 layer->SetBackgroundColor(background_color_); |
| 1125 layer->SetSafeOpaqueBackgroundColor(safe_opaque_background_color_); | 1124 layer->SetSafeOpaqueBackgroundColor(safe_opaque_background_color_); |
| 1126 layer->SetBounds(use_paint_properties ? paint_properties_.bounds | 1125 layer->SetBounds(use_paint_properties ? paint_properties_.bounds |
| 1127 : bounds_); | 1126 : bounds_); |
| 1128 | 1127 |
| 1129 #if defined(NDEBUG) | 1128 #if defined(NDEBUG) |
| 1130 if (frame_viewer_instrumentation::IsTracingLayerTreeSnapshots()) | 1129 if (frame_viewer_instrumentation::IsTracingLayerTreeSnapshots()) |
| 1131 layer->SetDebugInfo(TakeDebugInfo()); | 1130 layer->SetDebugInfo(TakeDebugInfo()); |
| 1132 #else | 1131 #else |
| 1133 layer->SetDebugInfo(TakeDebugInfo()); | 1132 layer->SetDebugInfo(TakeDebugInfo()); |
| (...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1820 ->data.num_copy_requests_in_subtree; | 1819 ->data.num_copy_requests_in_subtree; |
| 1821 } | 1820 } |
| 1822 | 1821 |
| 1823 gfx::Transform Layer::screen_space_transform() const { | 1822 gfx::Transform Layer::screen_space_transform() const { |
| 1824 DCHECK_NE(transform_tree_index_, -1); | 1823 DCHECK_NE(transform_tree_index_, -1); |
| 1825 return draw_property_utils::ScreenSpaceTransform( | 1824 return draw_property_utils::ScreenSpaceTransform( |
| 1826 this, layer_tree_host_->property_trees()->transform_tree); | 1825 this, layer_tree_host_->property_trees()->transform_tree); |
| 1827 } | 1826 } |
| 1828 | 1827 |
| 1829 } // namespace cc | 1828 } // namespace cc |
| OLD | NEW |