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

Side by Side Diff: Source/WebCore/page/FrameView.cpp

Issue 13859006: Rework composited scrolling updates. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@early-out2
Patch Set: . Created 7 years, 8 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
« no previous file with comments | « Source/WebCore/page/FrameView.h ('k') | Source/WebCore/rendering/RenderLayer.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 /* 1 /*
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Dirk Mueller <mueller@kde.org> 5 * 2000 Dirk Mueller <mueller@kde.org>
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * Copyright (C) 2009 Google Inc. All rights reserved. 9 * Copyright (C) 2009 Google Inc. All rights reserved.
10 * 10 *
(...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 { 708 {
709 RenderView* renderView = this->renderView(); 709 RenderView* renderView = this->renderView();
710 if (!renderView) 710 if (!renderView)
711 return; 711 return;
712 712
713 // If we expect to update compositing after an incipient layout, don't do so here. 713 // If we expect to update compositing after an incipient layout, don't do so here.
714 if (m_doingPreLayoutStyleUpdate || layoutPending() || renderView->needsLayou t()) 714 if (m_doingPreLayoutStyleUpdate || layoutPending() || renderView->needsLayou t())
715 return; 715 return;
716 716
717 // This call will make sure the cached hasAcceleratedCompositing is updated from the pref 717 // This call will make sure the cached hasAcceleratedCompositing is updated from the pref
718 renderView->compositor()->updateLayoutDependentState();
718 renderView->compositor()->cacheAcceleratedCompositingFlags(); 719 renderView->compositor()->cacheAcceleratedCompositingFlags();
719 renderView->compositor()->updateCompositingLayers(CompositingUpdateAfterStyl eChange); 720 renderView->compositor()->updateCompositingLayers(CompositingUpdateAfterStyl eChange);
720 } 721 }
721 722
722 void FrameView::updateCompositingLayersAfterLayout() 723 void FrameView::updateCompositingLayersAfterLayoutAndPositioning()
723 { 724 {
724 RenderView* renderView = this->renderView(); 725 RenderView* renderView = this->renderView();
725 if (!renderView) 726 if (!renderView)
726 return; 727 return;
727 728
728 // This call will make sure the cached hasAcceleratedCompositing is updated from the pref 729 // This call will make sure the cached hasAcceleratedCompositing is updated from the pref
729 renderView->compositor()->cacheAcceleratedCompositingFlags(); 730 renderView->compositor()->cacheAcceleratedCompositingFlags();
730 renderView->compositor()->updateCompositingLayers(CompositingUpdateAfterLayo ut); 731 renderView->compositor()->updateCompositingLayers(CompositingUpdateAfterLayo ut);
731 } 732 }
732 733
734 void FrameView::updateCompositingLayersAfterLayout()
735 {
736 RenderView* renderView = this->renderView();
737 if (!renderView)
738 return;
739
740 renderView->compositor()->updateLayoutDependentState();
741 }
742
733 bool FrameView::usesCompositedScrolling() const 743 bool FrameView::usesCompositedScrolling() const
734 { 744 {
735 RenderView* renderView = this->renderView(); 745 RenderView* renderView = this->renderView();
736 if (!renderView) 746 if (!renderView)
737 return false; 747 return false;
738 if (m_frame->settings() && m_frame->settings()->compositedScrollingForFrames Enabled()) 748 if (m_frame->settings() && m_frame->settings()->compositedScrollingForFrames Enabled())
739 return renderView->compositor()->inForcedCompositingMode(); 749 return renderView->compositor()->inForcedCompositingMode();
740 return false; 750 return false;
741 } 751 }
742 752
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
1137 adjustViewSize(); 1147 adjustViewSize();
1138 1148
1139 m_doFullRepaint = neededFullRepaint; 1149 m_doFullRepaint = neededFullRepaint;
1140 1150
1141 // Now update the positions of all layers. 1151 // Now update the positions of all layers.
1142 beginDeferredRepaints(); 1152 beginDeferredRepaints();
1143 if (m_doFullRepaint) 1153 if (m_doFullRepaint)
1144 root->view()->repaint(); // FIXME: This isn't really right, since the Re nderView doesn't fully encompass the visibleContentRect(). It just happens 1154 root->view()->repaint(); // FIXME: This isn't really right, since the Re nderView doesn't fully encompass the visibleContentRect(). It just happens
1145 // to work out most of the time, since first la youts and printing don't have you scrolled anywhere. 1155 // to work out most of the time, since first la youts and printing don't have you scrolled anywhere.
1146 1156
1157 updateCompositingLayersAfterLayout();
1158
1147 layer->updateLayerPositionsAfterLayout(renderView()->layer(), updateLayerPos itionFlags(layer, subtree, m_doFullRepaint)); 1159 layer->updateLayerPositionsAfterLayout(renderView()->layer(), updateLayerPos itionFlags(layer, subtree, m_doFullRepaint));
1148 1160
1149 endDeferredRepaints(); 1161 endDeferredRepaints();
1150 1162
1151 updateCompositingLayersAfterLayout(); 1163 updateCompositingLayersAfterLayoutAndPositioning();
1152 1164
1153 m_layoutCount++; 1165 m_layoutCount++;
1154 1166
1155 if (AXObjectCache* cache = root->document()->existingAXObjectCache()) 1167 if (AXObjectCache* cache = root->document()->existingAXObjectCache())
1156 cache->postNotification(root, AXObjectCache::AXLayoutComplete, true); 1168 cache->postNotification(root, AXObjectCache::AXLayoutComplete, true);
1157 updateAnnotatedRegions(); 1169 updateAnnotatedRegions();
1158 1170
1159 ASSERT(!root->needsLayout()); 1171 ASSERT(!root->needsLayout());
1160 1172
1161 updateCanBlitOnScrollRecursively(); 1173 updateCanBlitOnScrollRecursively();
(...skipping 2431 matching lines...) Expand 10 before | Expand all | Expand 10 after
3593 } 3605 }
3594 3606
3595 AXObjectCache* FrameView::axObjectCache() const 3607 AXObjectCache* FrameView::axObjectCache() const
3596 { 3608 {
3597 if (frame() && frame()->document()) 3609 if (frame() && frame()->document())
3598 return frame()->document()->existingAXObjectCache(); 3610 return frame()->document()->existingAXObjectCache();
3599 return 0; 3611 return 0;
3600 } 3612 }
3601 3613
3602 } // namespace WebCore 3614 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/page/FrameView.h ('k') | Source/WebCore/rendering/RenderLayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698