| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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 "config.h" | 5 #include "config.h" |
| 6 | 6 |
| 7 #include "cc/layer_tree_host_impl.h" | 7 #include "cc/layer_tree_host_impl.h" |
| 8 | 8 |
| 9 #include <algorithm> |
| 10 |
| 9 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 10 #include "base/debug/trace_event.h" | 12 #include "base/debug/trace_event.h" |
| 11 #include "cc/append_quads_data.h" | 13 #include "cc/append_quads_data.h" |
| 12 #include "cc/damage_tracker.h" | 14 #include "cc/damage_tracker.h" |
| 13 #include "cc/debug_rect_history.h" | 15 #include "cc/debug_rect_history.h" |
| 14 #include "cc/delay_based_time_source.h" | 16 #include "cc/delay_based_time_source.h" |
| 15 #include "cc/font_atlas.h" | 17 #include "cc/font_atlas.h" |
| 16 #include "cc/frame_rate_counter.h" | 18 #include "cc/frame_rate_counter.h" |
| 17 #include "cc/geometry.h" | 19 #include "cc/geometry.h" |
| 18 #include "cc/gl_renderer.h" | 20 #include "cc/gl_renderer.h" |
| 19 #include "cc/heads_up_display_layer_impl.h" | 21 #include "cc/heads_up_display_layer_impl.h" |
| 20 #include "cc/layer_iterator.h" | 22 #include "cc/layer_iterator.h" |
| 21 #include "cc/layer_tree_host.h" | 23 #include "cc/layer_tree_host.h" |
| 22 #include "cc/layer_tree_host_common.h" | 24 #include "cc/layer_tree_host_common.h" |
| 23 #include "cc/math_util.h" | 25 #include "cc/math_util.h" |
| 24 #include "cc/overdraw_metrics.h" | 26 #include "cc/overdraw_metrics.h" |
| 25 #include "cc/page_scale_animation.h" | 27 #include "cc/page_scale_animation.h" |
| 26 #include "cc/prioritized_resource_manager.h" | 28 #include "cc/prioritized_resource_manager.h" |
| 27 #include "cc/render_pass_draw_quad.h" | 29 #include "cc/render_pass_draw_quad.h" |
| 28 #include "cc/rendering_stats.h" | 30 #include "cc/rendering_stats.h" |
| 29 #include "cc/scrollbar_animation_controller.h" | 31 #include "cc/scrollbar_animation_controller.h" |
| 30 #include "cc/scrollbar_layer_impl.h" | 32 #include "cc/scrollbar_layer_impl.h" |
| 31 #include "cc/settings.h" | 33 #include "cc/settings.h" |
| 32 #include "cc/single_thread_proxy.h" | 34 #include "cc/single_thread_proxy.h" |
| 33 #include "cc/software_renderer.h" | 35 #include "cc/software_renderer.h" |
| 34 #include "cc/texture_uploader.h" | 36 #include "cc/texture_uploader.h" |
| 35 #include "ui/gfx/size_conversions.h" | 37 #include "ui/gfx/size_conversions.h" |
| 36 #include "ui/gfx/vector2d_conversions.h" | 38 #include "ui/gfx/vector2d_conversions.h" |
| 37 #include <algorithm> | |
| 38 | 39 |
| 39 using WebKit::WebTransformationMatrix; | 40 using WebKit::WebTransformationMatrix; |
| 40 | 41 |
| 41 namespace { | 42 namespace { |
| 42 | 43 |
| 43 void didVisibilityChange(cc::LayerTreeHostImpl* id, bool visible) | 44 void didVisibilityChange(cc::LayerTreeHostImpl* id, bool visible) |
| 44 { | 45 { |
| 45 if (visible) { | 46 if (visible) { |
| 46 TRACE_EVENT_ASYNC_BEGIN1("webkit", "LayerTreeHostImpl::setVisible", id,
"LayerTreeHostImpl", id); | 47 TRACE_EVENT_ASYNC_BEGIN1("webkit", "LayerTreeHostImpl::setVisible", id,
"LayerTreeHostImpl", id); |
| 47 return; | 48 return; |
| (...skipping 1425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1473 ScrollbarAnimationController* scrollbarController = layer->scrollbarAnimatio
nController(); | 1474 ScrollbarAnimationController* scrollbarController = layer->scrollbarAnimatio
nController(); |
| 1474 double monotonicTime = (time - base::TimeTicks()).InSecondsF(); | 1475 double monotonicTime = (time - base::TimeTicks()).InSecondsF(); |
| 1475 if (scrollbarController && scrollbarController->animate(monotonicTime)) | 1476 if (scrollbarController && scrollbarController->animate(monotonicTime)) |
| 1476 m_client->setNeedsRedrawOnImplThread(); | 1477 m_client->setNeedsRedrawOnImplThread(); |
| 1477 | 1478 |
| 1478 for (size_t i = 0; i < layer->children().size(); ++i) | 1479 for (size_t i = 0; i < layer->children().size(); ++i) |
| 1479 animateScrollbarsRecursive(layer->children()[i], time); | 1480 animateScrollbarsRecursive(layer->children()[i], time); |
| 1480 } | 1481 } |
| 1481 | 1482 |
| 1482 } // namespace cc | 1483 } // namespace cc |
| OLD | NEW |