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 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
583 } | 583 } |
584 | 584 |
585 void Layer::SetTextureScale(float x_scale, float y_scale) { | 585 void Layer::SetTextureScale(float x_scale, float y_scale) { |
586 DCHECK(texture_layer_.get()); | 586 DCHECK(texture_layer_.get()); |
587 texture_x_scale_ = x_scale; | 587 texture_x_scale_ = x_scale; |
588 texture_y_scale_ = y_scale; | 588 texture_y_scale_ = y_scale; |
589 RecomputeDrawsContentAndUVRect(); | 589 RecomputeDrawsContentAndUVRect(); |
590 } | 590 } |
591 | 591 |
592 void Layer::SetShowSurface( | 592 void Layer::SetShowSurface( |
593 cc::SurfaceId surface_id, | 593 const cc::SurfaceId& surface_id, |
594 const cc::SurfaceLayer::SatisfyCallback& satisfy_callback, | 594 const cc::SurfaceLayer::SatisfyCallback& satisfy_callback, |
595 const cc::SurfaceLayer::RequireCallback& require_callback, | 595 const cc::SurfaceLayer::RequireCallback& require_callback, |
596 gfx::Size surface_size, | 596 gfx::Size surface_size, |
597 float scale, | 597 float scale, |
598 gfx::Size frame_size_in_dip) { | 598 gfx::Size frame_size_in_dip) { |
599 DCHECK(type_ == LAYER_TEXTURED || type_ == LAYER_SOLID_COLOR); | 599 DCHECK(type_ == LAYER_TEXTURED || type_ == LAYER_SOLID_COLOR); |
600 | 600 |
601 scoped_refptr<cc::SurfaceLayer> new_layer = | 601 scoped_refptr<cc::SurfaceLayer> new_layer = |
602 cc::SurfaceLayer::Create(satisfy_callback, require_callback); | 602 cc::SurfaceLayer::Create(satisfy_callback, require_callback); |
603 new_layer->SetSurfaceId(surface_id, scale, surface_size); | 603 new_layer->SetSurfaceId(surface_id, scale, surface_size); |
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1051 if (animator_) { | 1051 if (animator_) { |
1052 animator_->ResetCompositor(compositor); | 1052 animator_->ResetCompositor(compositor); |
1053 animator_->RemoveFromCollection(collection); | 1053 animator_->RemoveFromCollection(collection); |
1054 } | 1054 } |
1055 | 1055 |
1056 for (auto* child : children_) | 1056 for (auto* child : children_) |
1057 child->ResetCompositorForAnimatorsInTree(compositor); | 1057 child->ResetCompositorForAnimatorsInTree(compositor); |
1058 } | 1058 } |
1059 | 1059 |
1060 } // namespace ui | 1060 } // namespace ui |
OLD | NEW |