| 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 "CCLayerTreeHost.h" | 7 #include "CCLayerTreeHost.h" |
| 8 | 8 |
| 9 #include "CCFontAtlas.h" | 9 #include "CCFontAtlas.h" |
| 10 #include "CCGraphicsContext.h" | 10 #include "CCGraphicsContext.h" |
| (...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 631 LayerChromium* rootScrollLayer = findFirstScrollableLayer(m_rootLayer.get())
; | 631 LayerChromium* rootScrollLayer = findFirstScrollableLayer(m_rootLayer.get())
; |
| 632 IntSize rootScrollDelta; | 632 IntSize rootScrollDelta; |
| 633 | 633 |
| 634 for (size_t i = 0; i < info.scrolls.size(); ++i) { | 634 for (size_t i = 0; i < info.scrolls.size(); ++i) { |
| 635 LayerChromium* layer = CCLayerTreeHostCommon::findLayerInSubtree(m_rootL
ayer.get(), info.scrolls[i].layerId); | 635 LayerChromium* layer = CCLayerTreeHostCommon::findLayerInSubtree(m_rootL
ayer.get(), info.scrolls[i].layerId); |
| 636 if (!layer) | 636 if (!layer) |
| 637 continue; | 637 continue; |
| 638 if (layer == rootScrollLayer) | 638 if (layer == rootScrollLayer) |
| 639 rootScrollDelta += info.scrolls[i].scrollDelta; | 639 rootScrollDelta += info.scrolls[i].scrollDelta; |
| 640 else | 640 else |
| 641 layer->scrollBy(info.scrolls[i].scrollDelta); | 641 layer->setScrollPosition(layer->scrollPosition() + info.scrolls[i].s
crollDelta); |
| 642 } | 642 } |
| 643 if (!rootScrollDelta.isZero() || info.pageScaleDelta != 1) | 643 if (!rootScrollDelta.isZero() || info.pageScaleDelta != 1) |
| 644 m_client->applyScrollAndScale(rootScrollDelta, info.pageScaleDelta); | 644 m_client->applyScrollAndScale(rootScrollDelta, info.pageScaleDelta); |
| 645 } | 645 } |
| 646 | 646 |
| 647 void CCLayerTreeHost::startRateLimiter(WebKit::WebGraphicsContext3D* context) | 647 void CCLayerTreeHost::startRateLimiter(WebKit::WebGraphicsContext3D* context) |
| 648 { | 648 { |
| 649 if (m_animating) | 649 if (m_animating) |
| 650 return; | 650 return; |
| 651 | 651 |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 746 else | 746 else |
| 747 layer->notifyAnimationFinished(wallClockTime); | 747 layer->notifyAnimationFinished(wallClockTime); |
| 748 } | 748 } |
| 749 } | 749 } |
| 750 | 750 |
| 751 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn
dex) | 751 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn
dex) |
| 752 setAnimationEventsRecursive(events, layer->children()[childIndex].get(),
wallClockTime); | 752 setAnimationEventsRecursive(events, layer->children()[childIndex].get(),
wallClockTime); |
| 753 } | 753 } |
| 754 | 754 |
| 755 } // namespace WebCore | 755 } // namespace WebCore |
| OLD | NEW |