Chromium Code Reviews| 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 "cc/layer_tree_host_impl.h" | 5 #include "cc/layer_tree_host_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 369 m_client->setNeedsCommitOnImplThread(); | 369 m_client->setNeedsCommitOnImplThread(); |
| 370 } | 370 } |
| 371 | 371 |
| 372 void LayerTreeHostImpl::scheduleAnimation() | 372 void LayerTreeHostImpl::scheduleAnimation() |
| 373 { | 373 { |
| 374 m_client->setNeedsRedrawOnImplThread(); | 374 m_client->setNeedsRedrawOnImplThread(); |
| 375 } | 375 } |
| 376 | 376 |
| 377 bool LayerTreeHostImpl::haveTouchEventHandlersAt(const gfx::Point& viewportPoint ) | 377 bool LayerTreeHostImpl::haveTouchEventHandlersAt(const gfx::Point& viewportPoint ) |
| 378 { | 378 { |
| 379 updateDrawProperties(); | |
|
enne (OOO)
2013/01/08 02:26:49
This is just a tiny request, but can you do what s
| |
| 379 | 380 |
| 380 gfx::PointF deviceViewportPoint = gfx::ScalePoint(viewportPoint, m_deviceSca leFactor); | 381 gfx::PointF deviceViewportPoint = gfx::ScalePoint(viewportPoint, m_deviceSca leFactor); |
| 381 | 382 |
| 382 // First find out which layer was hit from the saved list of visible layers | 383 // First find out which layer was hit from the saved list of visible layers |
| 383 // in the most recent frame. | 384 // in the most recent frame. |
| 384 LayerImpl* layerImpl = LayerTreeHostCommon::findLayerThatIsHitByPoint(device ViewportPoint, activeTree()->RenderSurfaceLayerList()); | 385 LayerImpl* layerImpl = LayerTreeHostCommon::findLayerThatIsHitByPoint(device ViewportPoint, activeTree()->RenderSurfaceLayerList()); |
| 385 | 386 |
| 386 // Walk up the hierarchy and look for a layer with a touch event handler reg ion that the given point hits. | 387 // Walk up the hierarchy and look for a layer with a touch event handler reg ion that the given point hits. |
| 387 for (; layerImpl; layerImpl = layerImpl->parent()) { | 388 for (; layerImpl; layerImpl = layerImpl->parent()) { |
| 388 if (LayerTreeHostCommon::layerHasTouchEventHandlersAt(deviceViewportPoint, layerImpl)) | 389 if (LayerTreeHostCommon::layerHasTouchEventHandlersAt(deviceViewportPoint, layerImpl)) |
| (...skipping 1312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1701 ScrollbarAnimationController* scrollbarController = layer->scrollbarAnimatio nController(); | 1702 ScrollbarAnimationController* scrollbarController = layer->scrollbarAnimatio nController(); |
| 1702 double monotonicTime = (time - base::TimeTicks()).InSecondsF(); | 1703 double monotonicTime = (time - base::TimeTicks()).InSecondsF(); |
| 1703 if (scrollbarController && scrollbarController->animate(monotonicTime)) | 1704 if (scrollbarController && scrollbarController->animate(monotonicTime)) |
| 1704 m_client->setNeedsRedrawOnImplThread(); | 1705 m_client->setNeedsRedrawOnImplThread(); |
| 1705 | 1706 |
| 1706 for (size_t i = 0; i < layer->children().size(); ++i) | 1707 for (size_t i = 0; i < layer->children().size(); ++i) |
| 1707 animateScrollbarsRecursive(layer->children()[i], time); | 1708 animateScrollbarsRecursive(layer->children()[i], time); |
| 1708 } | 1709 } |
| 1709 | 1710 |
| 1710 } // namespace cc | 1711 } // namespace cc |
| OLD | NEW |