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 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 if (bounds() == size) | 350 if (bounds() == size) |
351 return; | 351 return; |
352 bounds_ = size; | 352 bounds_ = size; |
353 | 353 |
354 if (!layer_tree_host_) | 354 if (!layer_tree_host_) |
355 return; | 355 return; |
356 | 356 |
357 if (ClipNode* clip_node = layer_tree_host_->property_trees()->clip_tree.Node( | 357 if (ClipNode* clip_node = layer_tree_host_->property_trees()->clip_tree.Node( |
358 clip_tree_index())) { | 358 clip_tree_index())) { |
359 if (clip_node->owner_id == id()) { | 359 if (clip_node->owner_id == id()) { |
360 clip_node->data.clip.set_size(size); | 360 clip_node->data.clip.set_size(gfx::SizeF(size)); |
361 layer_tree_host_->property_trees()->clip_tree.set_needs_update(true); | 361 layer_tree_host_->property_trees()->clip_tree.set_needs_update(true); |
362 } | 362 } |
363 } | 363 } |
364 | 364 |
365 SetNeedsCommitNoRebuild(); | 365 SetNeedsCommitNoRebuild(); |
366 } | 366 } |
367 | 367 |
368 Layer* Layer::RootLayer() { | 368 Layer* Layer::RootLayer() { |
369 Layer* layer = this; | 369 Layer* layer = this; |
370 while (layer->parent()) | 370 while (layer->parent()) |
(...skipping 1314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1685 this, layer_tree_host_->property_trees()->transform_tree); | 1685 this, layer_tree_host_->property_trees()->transform_tree); |
1686 } | 1686 } |
1687 | 1687 |
1688 gfx::Transform Layer::screen_space_transform() const { | 1688 gfx::Transform Layer::screen_space_transform() const { |
1689 DCHECK_NE(transform_tree_index_, -1); | 1689 DCHECK_NE(transform_tree_index_, -1); |
1690 return ScreenSpaceTransformFromPropertyTrees( | 1690 return ScreenSpaceTransformFromPropertyTrees( |
1691 this, layer_tree_host_->property_trees()->transform_tree); | 1691 this, layer_tree_host_->property_trees()->transform_tree); |
1692 } | 1692 } |
1693 | 1693 |
1694 } // namespace cc | 1694 } // namespace cc |
OLD | NEW |