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

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

Issue 24921002: Make compositingState explicit (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed second round of reviewer feedback Created 7 years, 2 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
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 1236 matching lines...) Expand 10 before | Expand all | Expand 10 after
1247 { 1247 {
1248 for (Frame* frame = m_frame.get(); frame; frame = frame->tree()->traverseNex t(m_frame.get())) { 1248 for (Frame* frame = m_frame.get(); frame; frame = frame->tree()->traverseNex t(m_frame.get())) {
1249 if (FrameView* view = frame->view()) 1249 if (FrameView* view = frame->view())
1250 view->setCanBlitOnScroll(!view->useSlowRepaints()); 1250 view->setCanBlitOnScroll(!view->useSlowRepaints());
1251 } 1251 }
1252 } 1252 }
1253 1253
1254 bool FrameView::contentsInCompositedLayer() const 1254 bool FrameView::contentsInCompositedLayer() const
1255 { 1255 {
1256 RenderView* renderView = this->renderView(); 1256 RenderView* renderView = this->renderView();
1257 if (renderView && renderView->isComposited()) { 1257 if (renderView && renderView->compositingState() == PaintsIntoOwnBacking) {
1258 GraphicsLayer* layer = renderView->layer()->compositedLayerMapping()->ma inGraphicsLayer(); 1258 GraphicsLayer* layer = renderView->layer()->compositedLayerMapping()->ma inGraphicsLayer();
1259 if (layer && layer->drawsContent()) 1259 if (layer && layer->drawsContent())
1260 return true; 1260 return true;
1261 } 1261 }
1262 1262
1263 return false; 1263 return false;
1264 } 1264 }
1265 1265
1266 void FrameView::setCannotBlitToWindow() 1266 void FrameView::setCannotBlitToWindow()
1267 { 1267 {
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
1358 ViewportConstrainedObjectSet::const_iterator end = m_viewportConstrainedObje cts->end(); 1358 ViewportConstrainedObjectSet::const_iterator end = m_viewportConstrainedObje cts->end();
1359 for (ViewportConstrainedObjectSet::const_iterator it = m_viewportConstrained Objects->begin(); it != end; ++it) { 1359 for (ViewportConstrainedObjectSet::const_iterator it = m_viewportConstrained Objects->begin(); it != end; ++it) {
1360 RenderObject* renderer = *it; 1360 RenderObject* renderer = *it;
1361 if (!renderer->style()->hasViewportConstrainedPosition()) 1361 if (!renderer->style()->hasViewportConstrainedPosition())
1362 continue; 1362 continue;
1363 1363
1364 // Fixed items should always have layers. 1364 // Fixed items should always have layers.
1365 ASSERT(renderer->hasLayer()); 1365 ASSERT(renderer->hasLayer());
1366 RenderLayer* layer = toRenderBoxModelObject(renderer)->layer(); 1366 RenderLayer* layer = toRenderBoxModelObject(renderer)->layer();
1367 1367
1368 // Composited layers may still actually paint into their ancestor. 1368 // Layers that paint into their ancestor or into a grouped backing will still need
1369 // If that happens, the viewport constrained object needs to be 1369 // to apply a repaint invalidation. If the layer paints into its own bac king, then
1370 // repainted on scroll. 1370 // it does not need repainting just to scroll.
1371 if (layer->isComposited() && !layer->compositedLayerMapping()->paintsInt oCompositedAncestor()) 1371 if (layer->compositingState() == PaintsIntoOwnBacking)
1372 continue; 1372 continue;
1373 1373
1374 if (layer->viewportConstrainedNotCompositedReason() == RenderLayer::NotC ompositedForBoundsOutOfView 1374 if (layer->viewportConstrainedNotCompositedReason() == RenderLayer::NotC ompositedForBoundsOutOfView
1375 || layer->viewportConstrainedNotCompositedReason() == RenderLayer::N otCompositedForNoVisibleContent) { 1375 || layer->viewportConstrainedNotCompositedReason() == RenderLayer::N otCompositedForNoVisibleContent) {
1376 // Don't invalidate for invisible fixed layers. 1376 // Don't invalidate for invisible fixed layers.
1377 continue; 1377 continue;
1378 } 1378 }
1379 1379
1380 if (layer->hasAncestorWithFilterOutsets()) { 1380 if (layer->hasAncestorWithFilterOutsets()) {
1381 // If the fixed layer has a blur/drop-shadow filter applied on at le ast one of its parents, we cannot 1381 // If the fixed layer has a blur/drop-shadow filter applied on at le ast one of its parents, we cannot
(...skipping 2018 matching lines...) Expand 10 before | Expand all | Expand 10 after
3400 return frame().document()->existingAXObjectCache(); 3400 return frame().document()->existingAXObjectCache();
3401 return 0; 3401 return 0;
3402 } 3402 }
3403 3403
3404 bool FrameView::isMainFrame() const 3404 bool FrameView::isMainFrame() const
3405 { 3405 {
3406 return m_frame->page() && m_frame->page()->mainFrame() == m_frame; 3406 return m_frame->page() && m_frame->page()->mainFrame() == m_frame;
3407 } 3407 }
3408 3408
3409 } // namespace WebCore 3409 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698