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

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 first round of reviewer comments 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 1227 matching lines...) Expand 10 before | Expand all | Expand 10 after
1238 { 1238 {
1239 for (Frame* frame = m_frame.get(); frame; frame = frame->tree()->traverseNex t(m_frame.get())) { 1239 for (Frame* frame = m_frame.get(); frame; frame = frame->tree()->traverseNex t(m_frame.get())) {
1240 if (FrameView* view = frame->view()) 1240 if (FrameView* view = frame->view())
1241 view->setCanBlitOnScroll(!view->useSlowRepaints()); 1241 view->setCanBlitOnScroll(!view->useSlowRepaints());
1242 } 1242 }
1243 } 1243 }
1244 1244
1245 bool FrameView::contentsInCompositedLayer() const 1245 bool FrameView::contentsInCompositedLayer() const
1246 { 1246 {
1247 RenderView* renderView = this->renderView(); 1247 RenderView* renderView = this->renderView();
1248 if (renderView && renderView->isComposited()) { 1248 if (renderView && renderView->compositingState() == PaintsIntoOwnBacking) {
1249 GraphicsLayer* layer = renderView->layer()->backing()->graphicsLayer(); 1249 GraphicsLayer* layer = renderView->layer()->backing()->graphicsLayer();
1250 if (layer && layer->drawsContent()) 1250 if (layer && layer->drawsContent())
1251 return true; 1251 return true;
1252 } 1252 }
1253 1253
1254 return false; 1254 return false;
1255 } 1255 }
1256 1256
1257 void FrameView::setCannotBlitToWindow() 1257 void FrameView::setCannotBlitToWindow()
1258 { 1258 {
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
1352 if (!renderer->style()->hasViewportConstrainedPosition()) 1352 if (!renderer->style()->hasViewportConstrainedPosition())
1353 continue; 1353 continue;
1354 1354
1355 // Fixed items should always have layers. 1355 // Fixed items should always have layers.
1356 ASSERT(renderer->hasLayer()); 1356 ASSERT(renderer->hasLayer());
1357 RenderLayer* layer = toRenderBoxModelObject(renderer)->layer(); 1357 RenderLayer* layer = toRenderBoxModelObject(renderer)->layer();
1358 1358
1359 // Composited layers may still actually paint into their ancestor. 1359 // Composited layers may still actually paint into their ancestor.
1360 // If that happens, the viewport constrained object needs to be 1360 // If that happens, the viewport constrained object needs to be
1361 // repainted on scroll. 1361 // repainted on scroll.
1362 if (layer->isComposited() && !layer->backing()->paintsIntoCompositedAnce stor()) 1362 if (layer->compositingState() == PaintsIntoOwnBacking)
1363 continue; 1363 continue;
1364 1364
1365 if (layer->viewportConstrainedNotCompositedReason() == RenderLayer::NotC ompositedForBoundsOutOfView 1365 if (layer->viewportConstrainedNotCompositedReason() == RenderLayer::NotC ompositedForBoundsOutOfView
1366 || layer->viewportConstrainedNotCompositedReason() == RenderLayer::N otCompositedForNoVisibleContent) { 1366 || layer->viewportConstrainedNotCompositedReason() == RenderLayer::N otCompositedForNoVisibleContent) {
1367 // Don't invalidate for invisible fixed layers. 1367 // Don't invalidate for invisible fixed layers.
1368 continue; 1368 continue;
1369 } 1369 }
1370 1370
1371 if (layer->hasAncestorWithFilterOutsets()) { 1371 if (layer->hasAncestorWithFilterOutsets()) {
1372 // If the fixed layer has a blur/drop-shadow filter applied on at le ast one of its parents, we cannot 1372 // If the fixed layer has a blur/drop-shadow filter applied on at le ast one of its parents, we cannot
(...skipping 2035 matching lines...) Expand 10 before | Expand all | Expand 10 after
3408 return frame().document()->existingAXObjectCache(); 3408 return frame().document()->existingAXObjectCache();
3409 return 0; 3409 return 0;
3410 } 3410 }
3411 3411
3412 bool FrameView::isMainFrame() const 3412 bool FrameView::isMainFrame() const
3413 { 3413 {
3414 return m_frame->page() && m_frame->page()->mainFrame() == m_frame; 3414 return m_frame->page() && m_frame->page()->mainFrame() == m_frame;
3415 } 3415 }
3416 3416
3417 } // namespace WebCore 3417 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698