| 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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 bool Layer::IsPropertyChangeAllowed() const { | 229 bool Layer::IsPropertyChangeAllowed() const { |
| 230 if (!layer_tree_host_) | 230 if (!layer_tree_host_) |
| 231 return true; | 231 return true; |
| 232 | 232 |
| 233 if (!layer_tree_host_->settings().strict_layer_property_change_checking) | 233 if (!layer_tree_host_->settings().strict_layer_property_change_checking) |
| 234 return true; | 234 return true; |
| 235 | 235 |
| 236 return !layer_tree_host_->in_paint_layer_contents(); | 236 return !layer_tree_host_->in_paint_layer_contents(); |
| 237 } | 237 } |
| 238 | 238 |
| 239 skia::RefPtr<SkPicture> Layer::GetPicture() const { | 239 sk_sp<SkPicture> Layer::GetPicture() const { |
| 240 return skia::RefPtr<SkPicture>(); | 240 return nullptr; |
| 241 } | 241 } |
| 242 | 242 |
| 243 void Layer::SetParent(Layer* layer) { | 243 void Layer::SetParent(Layer* layer) { |
| 244 DCHECK(!layer || !layer->HasAncestor(this)); | 244 DCHECK(!layer || !layer->HasAncestor(this)); |
| 245 | 245 |
| 246 if (parent_should_know_need_push_properties()) { | 246 if (parent_should_know_need_push_properties()) { |
| 247 if (parent_) | 247 if (parent_) |
| 248 parent_->RemoveDependentNeedsPushProperties(); | 248 parent_->RemoveDependentNeedsPushProperties(); |
| 249 if (layer) | 249 if (layer) |
| 250 layer->AddDependentNeedsPushProperties(); | 250 layer->AddDependentNeedsPushProperties(); |
| (...skipping 1674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1925 this, layer_tree_host_->property_trees()->transform_tree); | 1925 this, layer_tree_host_->property_trees()->transform_tree); |
| 1926 } | 1926 } |
| 1927 | 1927 |
| 1928 gfx::Transform Layer::screen_space_transform() const { | 1928 gfx::Transform Layer::screen_space_transform() const { |
| 1929 DCHECK_NE(transform_tree_index_, -1); | 1929 DCHECK_NE(transform_tree_index_, -1); |
| 1930 return draw_property_utils::ScreenSpaceTransform( | 1930 return draw_property_utils::ScreenSpaceTransform( |
| 1931 this, layer_tree_host_->property_trees()->transform_tree); | 1931 this, layer_tree_host_->property_trees()->transform_tree); |
| 1932 } | 1932 } |
| 1933 | 1933 |
| 1934 } // namespace cc | 1934 } // namespace cc |
| OLD | NEW |