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

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

Issue 212553004: [repaint-after-layout] Skip invalidations if our RenderView did a full invalidation. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase to master 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 | no next file » | 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 1019 matching lines...) Expand 10 before | Expand all | Expand 10 after
1030 ASSERT(RuntimeEnabledFeatures::repaintAfterLayoutEnabled()); 1030 ASSERT(RuntimeEnabledFeatures::repaintAfterLayoutEnabled());
1031 ASSERT(!root->needsLayout()); 1031 ASSERT(!root->needsLayout());
1032 // We should only repaint for the outer most layout. This works as 1032 // We should only repaint for the outer most layout. This works as
1033 // we continue to track repaint rects until this function is called. 1033 // we continue to track repaint rects until this function is called.
1034 ASSERT(!m_nestedLayoutCount); 1034 ASSERT(!m_nestedLayoutCount);
1035 1035
1036 // FIXME: really, we're in the repaint phase here, and the compositing queri es are legal. 1036 // FIXME: really, we're in the repaint phase here, and the compositing queri es are legal.
1037 // Until those states are fully fledged, I'll just disable the ASSERTS. 1037 // Until those states are fully fledged, I'll just disable the ASSERTS.
1038 DisableCompositingQueryAsserts disabler; 1038 DisableCompositingQueryAsserts disabler;
1039 1039
1040 bool renderViewDidFullInvalidation = false;
1041
1040 for (RenderObject* renderer = root; renderer; renderer = renderer->nextInPre Order()) { 1042 for (RenderObject* renderer = root; renderer; renderer = renderer->nextInPre Order()) {
1043 // If the RenderView did a full invalidation, and that's the view that w e're part
1044 // of, skip issuing invalidations for the RenderObject as it will be
1045 // covered by the RenderView invalidation.
1046 if (!renderer->hasLayer() && renderer != root && (renderer->view() == ro ot) && renderViewDidFullInvalidation) {
Julien - ping for review 2014/03/27 22:37:26 I don't think we should check hasLayer() here as i
dsinclair 2014/03/28 18:35:26 Done.
1047 renderer->clearRepaintState();
1048 continue;
1049 }
1050
1041 const LayoutRect& oldRepaintRect = renderer->oldRepaintRect(); 1051 const LayoutRect& oldRepaintRect = renderer->oldRepaintRect();
1042 const LayoutRect& newRepaintRect = renderer->newRepaintRect(); 1052 const LayoutRect& newRepaintRect = renderer->newRepaintRect();
1043 1053
1044 if ((renderer->onlyNeededPositionedMovementLayout() && renderer->composi tingState() != PaintsIntoOwnBacking) 1054 if ((renderer->onlyNeededPositionedMovementLayout() && renderer->composi tingState() != PaintsIntoOwnBacking)
1045 || (renderer->shouldDoFullRepaintIfSelfPaintingLayer() 1055 || (renderer->shouldDoFullRepaintIfSelfPaintingLayer()
1046 && renderer->hasLayer() 1056 && renderer->hasLayer()
1047 && toRenderLayerModelObject(renderer)->layer()->isSelfPaintingLa yer())) { 1057 && toRenderLayerModelObject(renderer)->layer()->isSelfPaintingLa yer())) {
1048 renderer->setShouldDoFullRepaintAfterLayout(true); 1058 renderer->setShouldDoFullRepaintAfterLayout(true);
1049 } 1059 }
1050 1060
1061 if (renderer == root && root->isRenderView())
Julien - ping for review 2014/03/27 22:37:26 Note that this check will be run for each renderer
dsinclair 2014/03/28 18:35:26 Done.
1062 renderViewDidFullInvalidation = renderer->shouldDoFullRepaintAfterLa yout();
1063
1051 // FIXME: Currently renderers with layers will get repainted when we cal l updateLayerPositionsAfterLayout. 1064 // FIXME: Currently renderers with layers will get repainted when we cal l updateLayerPositionsAfterLayout.
1052 // That call should be broken apart to position the layers be done befor e 1065 // That call should be broken apart to position the layers be done befor e
1053 // the repaintTree call so this will repaint everything. 1066 // the repaintTree call so this will repaint everything.
1054 bool didFullRepaint = false; 1067 bool didFullRepaint = false;
1055 if (!renderer->layoutDidGetCalled()) { 1068 if (!renderer->layoutDidGetCalled()) {
1056 if (renderer->shouldDoFullRepaintAfterLayout()) { 1069 if (renderer->shouldDoFullRepaintAfterLayout()) {
1057 renderer->repaint(); 1070 renderer->repaint();
1058 didFullRepaint = true; 1071 didFullRepaint = true;
1059 } 1072 }
1060 1073
(...skipping 2186 matching lines...) Expand 10 before | Expand all | Expand 10 after
3247 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o rientation) 3260 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o rientation)
3248 { 3261 {
3249 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); 3262 ScrollableArea::willRemoveScrollbar(scrollbar, orientation);
3250 if (AXObjectCache* cache = axObjectCache()) { 3263 if (AXObjectCache* cache = axObjectCache()) {
3251 cache->remove(scrollbar); 3264 cache->remove(scrollbar);
3252 cache->handleScrollbarUpdate(this); 3265 cache->handleScrollbarUpdate(this);
3253 } 3266 }
3254 } 3267 }
3255 3268
3256 } // namespace WebCore 3269 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698