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

Side by Side Diff: Source/core/rendering/compositing/RenderLayerCompositor.cpp

Issue 215063006: Separate the geometry update from rebuilding the GraphicsLayer tree (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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) 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 if (scrollableAreas) { 513 if (scrollableAreas) {
514 for (FrameView::ScrollableAreaSet::iterator it = scrollableAreas ->begin(); it != scrollableAreas->end(); ++it) 514 for (FrameView::ScrollableAreaSet::iterator it = scrollableAreas ->begin(); it != scrollableAreas->end(); ++it)
515 (*it)->updateHasVisibleNonLayerContent(); 515 (*it)->updateHasVisibleNonLayerContent();
516 } 516 }
517 } 517 }
518 518
519 if (layersChanged) 519 if (layersChanged)
520 needHierarchyAndGeometryUpdate = true; 520 needHierarchyAndGeometryUpdate = true;
521 } 521 }
522 522
523 if (needGeometryUpdate || needHierarchyAndGeometryUpdate) {
524 // We just need to do a geometry update. This is only used for position: fixed scrolling;
525 // most of the time, geometry is updated via RenderLayer::styleChanged() .
ojan 2014/03/28 02:26:16 I know this isn't new to this patch, but this comm
abarth-chromium 2014/03/28 02:37:14 It's more wrong now. I'll remove it.
526 TRACE_EVENT0("blink_rendering", "GraphicsLayerUpdater::updateRecursive") ;
esprehn 2014/03/28 02:24:09 The ones in recalcstyle are all webkit, should we
abarth-chromium 2014/03/28 02:37:14 Dunno. Probably? "webkit" is so 2012
527 GraphicsLayerUpdater().update(*updateRoot, updateType);
528 }
529
523 if (needHierarchyAndGeometryUpdate) { 530 if (needHierarchyAndGeometryUpdate) {
524 // Update the hierarchy of the compositing layers. 531 // Update the hierarchy of the compositing layers.
525 GraphicsLayerVector childList; 532 GraphicsLayerVector childList;
526 { 533 {
527 TRACE_EVENT0("blink_rendering", "GraphicsLayerUpdater::rebuildTree") ; 534 TRACE_EVENT0("blink_rendering", "GraphicsLayerUpdater::rebuildTree") ;
528 GraphicsLayerUpdater().rebuildTree(*updateRoot, updateType, childLis t); 535 GraphicsLayerUpdater().rebuildTree(*updateRoot, childList);
529 } 536 }
530 537
531 // Host the document layer in the RenderView's root layer. 538 // Host the document layer in the RenderView's root layer.
532 if (RuntimeEnabledFeatures::overlayFullscreenVideoEnabled() && isMainFra me()) { 539 if (RuntimeEnabledFeatures::overlayFullscreenVideoEnabled() && isMainFra me()) {
533 RenderVideo* video = findFullscreenVideoRenderer(m_renderView.docume nt()); 540 RenderVideo* video = findFullscreenVideoRenderer(m_renderView.docume nt());
534 if (video && video->hasCompositedLayerMapping()) { 541 if (video && video->hasCompositedLayerMapping()) {
535 childList.clear(); 542 childList.clear();
536 childList.append(video->compositedLayerMapping()->mainGraphicsLa yer()); 543 childList.append(video->compositedLayerMapping()->mainGraphicsLa yer());
537 } 544 }
538 } 545 }
539 546
540 if (childList.isEmpty()) 547 if (childList.isEmpty())
541 destroyRootLayer(); 548 destroyRootLayer();
542 else 549 else
543 m_rootContentLayer->setChildren(childList); 550 m_rootContentLayer->setChildren(childList);
544 } else if (needGeometryUpdate) {
545 // We just need to do a geometry update. This is only used for position: fixed scrolling;
546 // most of the time, geometry is updated via RenderLayer::styleChanged() .
547 TRACE_EVENT0("blink_rendering", "GraphicsLayerUpdater::updateRecursive") ;
548 GraphicsLayerUpdater().updateRecursive(*updateRoot, updateType);
549 } 551 }
550 552
551 ASSERT(updateRoot || !m_compositingLayersNeedRebuild); 553 ASSERT(updateRoot || !m_compositingLayersNeedRebuild);
552 554
553 if (!hasAcceleratedCompositing()) 555 if (!hasAcceleratedCompositing())
554 enableCompositingMode(false); 556 enableCompositingMode(false);
555 557
556 // The scrolling coordinator may realize that it needs updating while compos iting was being updated in this function. 558 // The scrolling coordinator may realize that it needs updating while compos iting was being updated in this function.
557 needsToUpdateScrollingCoordinator |= scrollingCoordinator() ? scrollingCoord inator()->needsToUpdateAfterCompositingChange() : false; 559 needsToUpdateScrollingCoordinator |= scrollingCoordinator() ? scrollingCoord inator()->needsToUpdateAfterCompositingChange() : false;
558 if (needsToUpdateScrollingCoordinator && isMainFrame() && scrollingCoordinat or() && inCompositingMode()) 560 if (needsToUpdateScrollingCoordinator && isMainFrame() && scrollingCoordinat or() && inCompositingMode())
(...skipping 1603 matching lines...) Expand 10 before | Expand all | Expand 10 after
2162 } else if (graphicsLayer == m_scrollLayer.get()) { 2164 } else if (graphicsLayer == m_scrollLayer.get()) {
2163 name = "LocalFrame Scrolling Layer"; 2165 name = "LocalFrame Scrolling Layer";
2164 } else { 2166 } else {
2165 ASSERT_NOT_REACHED(); 2167 ASSERT_NOT_REACHED();
2166 } 2168 }
2167 2169
2168 return name; 2170 return name;
2169 } 2171 }
2170 2172
2171 } // namespace WebCore 2173 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698