Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(391)

Side by Side Diff: cc/CCLayerTreeHost.cpp

Issue 10907075: Roll cc snapshot up to 127605 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/CCFrameRateController.cpp ('k') | cc/CCLayerTreeHostImpl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « cc/CCFrameRateController.cpp ('k') | cc/CCLayerTreeHostImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698