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 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "cc/base/scoped_ptr_algorithm.h" | 13 #include "cc/base/scoped_ptr_algorithm.h" |
14 #include "cc/layers/content_layer.h" | 14 #include "cc/layers/content_layer.h" |
15 #include "cc/layers/delegated_renderer_layer.h" | 15 #include "cc/layers/delegated_renderer_layer.h" |
16 #include "cc/layers/solid_color_layer.h" | 16 #include "cc/layers/solid_color_layer.h" |
17 #include "cc/layers/texture_layer.h" | 17 #include "cc/layers/texture_layer.h" |
18 #include "cc/output/copy_output_request.h" | 18 #include "cc/output/copy_output_request.h" |
19 #include "cc/output/delegated_frame_data.h" | 19 #include "cc/output/delegated_frame_data.h" |
20 #include "cc/output/filter_operation.h" | 20 #include "cc/output/filter_operation.h" |
21 #include "cc/output/filter_operations.h" | 21 #include "cc/output/filter_operations.h" |
22 #include "cc/resources/transferable_resource.h" | 22 #include "cc/resources/transferable_resource.h" |
23 #include "ui/base/animation/animation.h" | |
24 #include "ui/compositor/compositor_switches.h" | 23 #include "ui/compositor/compositor_switches.h" |
25 #include "ui/compositor/dip_util.h" | 24 #include "ui/compositor/dip_util.h" |
26 #include "ui/compositor/layer_animator.h" | 25 #include "ui/compositor/layer_animator.h" |
| 26 #include "ui/gfx/animation/animation.h" |
27 #include "ui/gfx/canvas.h" | 27 #include "ui/gfx/canvas.h" |
28 #include "ui/gfx/display.h" | 28 #include "ui/gfx/display.h" |
29 #include "ui/gfx/interpolated_transform.h" | 29 #include "ui/gfx/interpolated_transform.h" |
30 #include "ui/gfx/point3_f.h" | 30 #include "ui/gfx/point3_f.h" |
31 #include "ui/gfx/point_conversions.h" | 31 #include "ui/gfx/point_conversions.h" |
32 #include "ui/gfx/size_conversions.h" | 32 #include "ui/gfx/size_conversions.h" |
33 | 33 |
34 namespace { | 34 namespace { |
35 | 35 |
36 const ui::Layer* GetRoot(const ui::Layer* layer) { | 36 const ui::Layer* GetRoot(const ui::Layer* layer) { |
(...skipping 934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
971 cc_layer_->SetBounds(ConvertSizeToPixel(this, size)); | 971 cc_layer_->SetBounds(ConvertSizeToPixel(this, size)); |
972 } | 972 } |
973 | 973 |
974 void Layer::RecomputePosition() { | 974 void Layer::RecomputePosition() { |
975 cc_layer_->SetPosition(gfx::ScalePoint( | 975 cc_layer_->SetPosition(gfx::ScalePoint( |
976 gfx::PointF(bounds_.x(), bounds_.y()), | 976 gfx::PointF(bounds_.x(), bounds_.y()), |
977 device_scale_factor_)); | 977 device_scale_factor_)); |
978 } | 978 } |
979 | 979 |
980 } // namespace ui | 980 } // namespace ui |
OLD | NEW |