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

Side by Side Diff: Source/core/frame/FrameView.cpp

Issue 202533003: Don't schedule an animation during compositing dirty-bit setting unless needed. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add null check. Created 6 years, 9 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 | « no previous file | Source/core/page/PageAnimator.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 2762 matching lines...) Expand 10 before | Expand all | Expand 10 after
2773 2773
2774 ScrollView::paintOverhangAreas(context, horizontalOverhangArea, verticalOver hangArea, dirtyRect); 2774 ScrollView::paintOverhangAreas(context, horizontalOverhangArea, verticalOver hangArea, dirtyRect);
2775 } 2775 }
2776 2776
2777 void FrameView::updateLayoutAndStyleForPainting() 2777 void FrameView::updateLayoutAndStyleForPainting()
2778 { 2778 {
2779 // Updating layout can run script, which can tear down the FrameView. 2779 // Updating layout can run script, which can tear down the FrameView.
2780 RefPtr<FrameView> protector(this); 2780 RefPtr<FrameView> protector(this);
2781 2781
2782 updateLayoutAndStyleIfNeededRecursive(); 2782 updateLayoutAndStyleIfNeededRecursive();
2783 if (RenderView* view = renderView()) 2783 if (RenderView* view = renderView()) {
2784 ASSERT(!view->needsLayout());
2784 view->compositor()->updateCompositingLayers(); 2785 view->compositor()->updateCompositingLayers();
2786
2787 // FIXME: we should not have any dirty bits left at this point. Unfortun ately, this is not yet the case because
2788 // the code in updateCompositingLayers sometimes creates new dirty bits when updating direct compositing reasons.
2789 // See crbug.com/354100.
2790 view->compositor()->scheduleAnimationIfNeeded();
2791 }
2785 } 2792 }
2786 2793
2787 void FrameView::updateLayoutAndStyleIfNeededRecursive() 2794 void FrameView::updateLayoutAndStyleIfNeededRecursive()
2788 { 2795 {
2789 // We have to crawl our entire tree looking for any FrameViews that need 2796 // We have to crawl our entire tree looking for any FrameViews that need
2790 // layout and make sure they are up to date. 2797 // layout and make sure they are up to date.
2791 // Mac actually tests for intersection with the dirty region and tries not t o 2798 // Mac actually tests for intersection with the dirty region and tries not t o
2792 // update layout for frames that are outside the dirty region. Not only doe s this seem 2799 // update layout for frames that are outside the dirty region. Not only doe s this seem
2793 // pointless (since those frames will have set a zero timer to layout anyway ), but 2800 // pointless (since those frames will have set a zero timer to layout anyway ), but
2794 // it is also incorrect, since if two frames overlap, the first could be exc luded from the dirty 2801 // it is also incorrect, since if two frames overlap, the first could be exc luded from the dirty
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
3208 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o rientation) 3215 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o rientation)
3209 { 3216 {
3210 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); 3217 ScrollableArea::willRemoveScrollbar(scrollbar, orientation);
3211 if (AXObjectCache* cache = axObjectCache()) { 3218 if (AXObjectCache* cache = axObjectCache()) {
3212 cache->remove(scrollbar); 3219 cache->remove(scrollbar);
3213 cache->handleScrollbarUpdate(this); 3220 cache->handleScrollbarUpdate(this);
3214 } 3221 }
3215 } 3222 }
3216 3223
3217 } // namespace WebCore 3224 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | Source/core/page/PageAnimator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698