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

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

Issue 478823002: Don't repaint squashed, fixed position layers during scrolling (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 6 years, 4 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 | « LayoutTests/compositing/repaint/scroll-fixed-squahed-layer-expected.txt ('k') | 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 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after
1262 1262
1263 if (!m_viewportConstrainedObjects || m_viewportConstrainedObjects->isEmpty() ) { 1263 if (!m_viewportConstrainedObjects || m_viewportConstrainedObjects->isEmpty() ) {
1264 hostWindow()->scroll(); 1264 hostWindow()->scroll();
1265 return true; 1265 return true;
1266 } 1266 }
1267 1267
1268 Region regionToUpdate; 1268 Region regionToUpdate;
1269 ViewportConstrainedObjectSet::const_iterator end = m_viewportConstrainedObje cts->end(); 1269 ViewportConstrainedObjectSet::const_iterator end = m_viewportConstrainedObje cts->end();
1270 for (ViewportConstrainedObjectSet::const_iterator it = m_viewportConstrained Objects->begin(); it != end; ++it) { 1270 for (ViewportConstrainedObjectSet::const_iterator it = m_viewportConstrained Objects->begin(); it != end; ++it) {
1271 RenderObject* renderer = *it; 1271 RenderObject* renderer = *it;
1272 // m_viewportConstrainedObjects should not contain non-viewport constrai ned objects.
1273 ASSERT(renderer->style()->hasViewportConstrainedPosition()); 1272 ASSERT(renderer->style()->hasViewportConstrainedPosition());
1274
1275 // Fixed items should always have layers.
1276 ASSERT(renderer->hasLayer()); 1273 ASSERT(renderer->hasLayer());
1277 RenderLayer* layer = toRenderBoxModelObject(renderer)->layer(); 1274 RenderLayer* layer = toRenderBoxModelObject(renderer)->layer();
1278 1275
1279 // Layers that paint into their ancestor or into a grouped backing will still need 1276 CompositingState state = layer->compositingState();
1280 // to apply a paint invalidation. If the layer paints into its own backi ng, then 1277 if (state == PaintsIntoOwnBacking || state == PaintsIntoGroupedBacking)
1281 // it does not need paint invalidation just to scroll.
1282 if (layer->compositingState() == PaintsIntoOwnBacking)
1283 continue; 1278 continue;
1284 1279
1285 if (layer->hasAncestorWithFilterOutsets()) { 1280 if (layer->hasAncestorWithFilterOutsets()) {
1286 // If the fixed layer has a blur/drop-shadow filter applied on at le ast one of its parents, we cannot 1281 // If the fixed layer has a blur/drop-shadow filter applied on at le ast one of its parents, we cannot
1287 // scroll using the fast path, otherwise the outsets of the filter w ill be moved around the page. 1282 // scroll using the fast path, otherwise the outsets of the filter w ill be moved around the page.
1288 return false; 1283 return false;
1289 } 1284 }
1290 1285
1291 IntRect updateRect = pixelSnappedIntRect(layer->paintInvalidator().paint InvalidationRectIncludingNonCompositingDescendants()); 1286 IntRect updateRect = pixelSnappedIntRect(layer->paintInvalidator().paint InvalidationRectIncludingNonCompositingDescendants());
1292 1287
(...skipping 1841 matching lines...) Expand 10 before | Expand all | Expand 10 after
3134 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o rientation) 3129 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o rientation)
3135 { 3130 {
3136 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); 3131 ScrollableArea::willRemoveScrollbar(scrollbar, orientation);
3137 if (AXObjectCache* cache = axObjectCache()) { 3132 if (AXObjectCache* cache = axObjectCache()) {
3138 cache->remove(scrollbar); 3133 cache->remove(scrollbar);
3139 cache->handleScrollbarUpdate(this); 3134 cache->handleScrollbarUpdate(this);
3140 } 3135 }
3141 } 3136 }
3142 3137
3143 } // namespace blink 3138 } // namespace blink
OLDNEW
« no previous file with comments | « LayoutTests/compositing/repaint/scroll-fixed-squahed-layer-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698