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

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

Issue 33353003: Have Frame::tree() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master 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
« no previous file with comments | « Source/core/rendering/HitTestResult.cpp ('k') | Source/core/rendering/TextAutosizer.cpp » ('j') | 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) 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 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 } 441 }
442 442
443 #if !LOG_DISABLED 443 #if !LOG_DISABLED
444 if (compositingLogEnabled() && isFullUpdate && (needHierarchyUpdate || needG eometryUpdate)) { 444 if (compositingLogEnabled() && isFullUpdate && (needHierarchyUpdate || needG eometryUpdate)) {
445 m_obligateCompositedLayerCount = 0; 445 m_obligateCompositedLayerCount = 0;
446 m_secondaryCompositedLayerCount = 0; 446 m_secondaryCompositedLayerCount = 0;
447 m_obligatoryBackingStoreBytes = 0; 447 m_obligatoryBackingStoreBytes = 0;
448 m_secondaryBackingStoreBytes = 0; 448 m_secondaryBackingStoreBytes = 0;
449 449
450 Frame& frame = m_renderView->frameView()->frame(); 450 Frame& frame = m_renderView->frameView()->frame();
451 LOG(Compositing, "\nUpdate %d of %s.\n", m_rootLayerUpdateCount, isMainF rame() ? "main frame" : frame.tree()->uniqueName().string().utf8().data()); 451 LOG(Compositing, "\nUpdate %d of %s.\n", m_rootLayerUpdateCount, isMainF rame() ? "main frame" : frame.tree().uniqueName().string().utf8().data());
452 } 452 }
453 #endif 453 #endif
454 454
455 if (needHierarchyUpdate) { 455 if (needHierarchyUpdate) {
456 // Update the hierarchy of the compositing layers. 456 // Update the hierarchy of the compositing layers.
457 Vector<GraphicsLayer*> childList; 457 Vector<GraphicsLayer*> childList;
458 { 458 {
459 TRACE_EVENT0("blink_rendering", "RenderLayerCompositor::rebuildCompo sitingLayerTree"); 459 TRACE_EVENT0("blink_rendering", "RenderLayerCompositor::rebuildCompo sitingLayerTree");
460 rebuildCompositingLayerTree(updateRoot, childList, 0); 460 rebuildCompositingLayerTree(updateRoot, childList, 0);
461 } 461 }
(...skipping 2107 matching lines...) Expand 10 before | Expand all | Expand 10 after
2569 2569
2570 // IFrames are special, because we hook compositing layers together across ifram e boundaries 2570 // IFrames are special, because we hook compositing layers together across ifram e boundaries
2571 // when both parent and iframe content are composited. So when this frame become s composited, we have 2571 // when both parent and iframe content are composited. So when this frame become s composited, we have
2572 // to use a synthetic style change to get the iframes into RenderLayers in order to allow them to composite. 2572 // to use a synthetic style change to get the iframes into RenderLayers in order to allow them to composite.
2573 void RenderLayerCompositor::notifyIFramesOfCompositingChange() 2573 void RenderLayerCompositor::notifyIFramesOfCompositingChange()
2574 { 2574 {
2575 if (!m_renderView->frameView()) 2575 if (!m_renderView->frameView())
2576 return; 2576 return;
2577 Frame& frame = m_renderView->frameView()->frame(); 2577 Frame& frame = m_renderView->frameView()->frame();
2578 2578
2579 for (Frame* child = frame.tree()->firstChild(); child; child = child->tree() ->traverseNext(&frame)) { 2579 for (Frame* child = frame.tree().firstChild(); child; child = child->tree(). traverseNext(&frame)) {
2580 if (child->document() && child->document()->ownerElement()) 2580 if (child->document() && child->document()->ownerElement())
2581 child->document()->ownerElement()->scheduleLayerUpdate(); 2581 child->document()->ownerElement()->scheduleLayerUpdate();
2582 } 2582 }
2583 2583
2584 // Compositing also affects the answer to RenderIFrame::requiresAcceleratedC ompositing(), so 2584 // Compositing also affects the answer to RenderIFrame::requiresAcceleratedC ompositing(), so
2585 // we need to schedule a style recalc in our parent document. 2585 // we need to schedule a style recalc in our parent document.
2586 if (HTMLFrameOwnerElement* ownerElement = m_renderView->document().ownerElem ent()) 2586 if (HTMLFrameOwnerElement* ownerElement = m_renderView->document().ownerElem ent())
2587 ownerElement->scheduleLayerUpdate(); 2587 ownerElement->scheduleLayerUpdate();
2588 } 2588 }
2589 2589
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
2775 } else if (graphicsLayer == m_scrollLayer.get()) { 2775 } else if (graphicsLayer == m_scrollLayer.get()) {
2776 name = "Frame Scrolling Layer"; 2776 name = "Frame Scrolling Layer";
2777 } else { 2777 } else {
2778 ASSERT_NOT_REACHED(); 2778 ASSERT_NOT_REACHED();
2779 } 2779 }
2780 2780
2781 return name; 2781 return name;
2782 } 2782 }
2783 2783
2784 } // namespace WebCore 2784 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/HitTestResult.cpp ('k') | Source/core/rendering/TextAutosizer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698