OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ui/compositor/layer.h" | 5 #include "ui/compositor/layer.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <memory> | 8 #include <memory> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
518 cc_layer_->SetTransformOrigin(gfx::Point3F()); | 518 cc_layer_->SetTransformOrigin(gfx::Point3F()); |
519 cc_layer_->SetContentsOpaque(fills_bounds_opaquely_); | 519 cc_layer_->SetContentsOpaque(fills_bounds_opaquely_); |
520 cc_layer_->SetIsDrawable(type_ != LAYER_NOT_DRAWN); | 520 cc_layer_->SetIsDrawable(type_ != LAYER_NOT_DRAWN); |
521 cc_layer_->SetHideLayerAndSubtree(!visible_); | 521 cc_layer_->SetHideLayerAndSubtree(!visible_); |
522 cc_layer_->SetElementId(cc::ElementId(cc_layer_->id(), 0)); | 522 cc_layer_->SetElementId(cc::ElementId(cc_layer_->id(), 0)); |
523 | 523 |
524 SetLayerFilters(); | 524 SetLayerFilters(); |
525 SetLayerBackgroundFilters(); | 525 SetLayerBackgroundFilters(); |
526 } | 526 } |
527 | 527 |
528 bool Layer::HasPendingThreadedAnimationsForTesting() const { | |
529 return animator_->HasPendingThreadedAnimationsForTesting(); | |
530 } | |
531 | |
532 void Layer::SwitchCCLayerForTest() { | 528 void Layer::SwitchCCLayerForTest() { |
533 scoped_refptr<cc::Layer> new_layer = cc::PictureLayer::Create(this); | 529 scoped_refptr<cc::Layer> new_layer = cc::PictureLayer::Create(this); |
534 SwitchToLayer(new_layer); | 530 SwitchToLayer(new_layer); |
535 content_layer_ = new_layer; | 531 content_layer_ = new_layer; |
536 } | 532 } |
537 | 533 |
538 void Layer::SetTextureMailbox( | 534 void Layer::SetTextureMailbox( |
539 const cc::TextureMailbox& mailbox, | 535 const cc::TextureMailbox& mailbox, |
540 std::unique_ptr<cc::SingleReleaseCallback> release_callback, | 536 std::unique_ptr<cc::SingleReleaseCallback> release_callback, |
541 gfx::Size texture_size_in_dip) { | 537 gfx::Size texture_size_in_dip) { |
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1074 if (animator_) { | 1070 if (animator_) { |
1075 animator_->ResetCompositor(compositor); | 1071 animator_->ResetCompositor(compositor); |
1076 animator_->RemoveFromCollection(collection); | 1072 animator_->RemoveFromCollection(collection); |
1077 } | 1073 } |
1078 | 1074 |
1079 for (auto* child : children_) | 1075 for (auto* child : children_) |
1080 child->ResetCompositorForAnimatorsInTree(compositor); | 1076 child->ResetCompositorForAnimatorsInTree(compositor); |
1081 } | 1077 } |
1082 | 1078 |
1083 } // namespace ui | 1079 } // namespace ui |
OLD | NEW |