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

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

Issue 149653003: Avoid requiring a recalc to update compositing state for iframes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebaseline. Created 6 years, 10 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/RenderIFrame.cpp ('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) 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 2467 matching lines...) Expand 10 before | Expand all | Expand 10 after
2478 return; 2478 return;
2479 Frame& frame = m_renderView->frameView()->frame(); 2479 Frame& frame = m_renderView->frameView()->frame();
2480 2480
2481 for (Frame* child = frame.tree().firstChild(); child; child = child->tree(). traverseNext(&frame)) { 2481 for (Frame* child = frame.tree().firstChild(); child; child = child->tree(). traverseNext(&frame)) {
2482 if (child->document() && child->document()->ownerElement()) 2482 if (child->document() && child->document()->ownerElement())
2483 child->document()->ownerElement()->scheduleLayerUpdate(); 2483 child->document()->ownerElement()->scheduleLayerUpdate();
2484 } 2484 }
2485 2485
2486 // Compositing also affects the answer to RenderIFrame::requiresAcceleratedC ompositing(), so 2486 // Compositing also affects the answer to RenderIFrame::requiresAcceleratedC ompositing(), so
2487 // we need to schedule a style recalc in our parent document. 2487 // we need to schedule a style recalc in our parent document.
2488 if (HTMLFrameOwnerElement* ownerElement = m_renderView->document().ownerElem ent()) 2488 if (HTMLFrameOwnerElement* ownerElement = m_renderView->document().ownerElem ent()) {
2489 ownerElement->document().renderView()->compositor()->setNeedsToRecompute CompositingRequirements();
2489 ownerElement->scheduleLayerUpdate(); 2490 ownerElement->scheduleLayerUpdate();
shawnsingh 2014/02/06 13:32:16 I'm curious what else does scheduleLayerUpdate do
dstockwell 2014/02/07 03:22:03 That's all it does. I think we can remove it, but
2491 }
2490 } 2492 }
2491 2493
2492 bool RenderLayerCompositor::layerHas3DContent(const RenderLayer* layer) const 2494 bool RenderLayerCompositor::layerHas3DContent(const RenderLayer* layer) const
2493 { 2495 {
2494 const RenderStyle* style = layer->renderer()->style(); 2496 const RenderStyle* style = layer->renderer()->style();
2495 RenderLayerStackingNode* stackingNode = const_cast<RenderLayer*>(layer)->sta ckingNode(); 2497 RenderLayerStackingNode* stackingNode = const_cast<RenderLayer*>(layer)->sta ckingNode();
2496 2498
2497 if (style && 2499 if (style &&
2498 (style->transformStyle3D() == TransformStyle3DPreserve3D || 2500 (style->transformStyle3D() == TransformStyle3DPreserve3D ||
2499 style->hasPerspective() || 2501 style->hasPerspective() ||
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
2639 } else if (graphicsLayer == m_scrollLayer.get()) { 2641 } else if (graphicsLayer == m_scrollLayer.get()) {
2640 name = "Frame Scrolling Layer"; 2642 name = "Frame Scrolling Layer";
2641 } else { 2643 } else {
2642 ASSERT_NOT_REACHED(); 2644 ASSERT_NOT_REACHED();
2643 } 2645 }
2644 2646
2645 return name; 2647 return name;
2646 } 2648 }
2647 2649
2648 } // namespace WebCore 2650 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderIFrame.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698