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

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

Issue 207513002: Compute style-determined compositing reasons during recalc style (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: No longer friends Created 6 years, 9 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 1551 matching lines...) Expand 10 before | Expand all | Expand 10 after
1562 FrameView* frameView = m_renderView.frameView(); 1562 FrameView* frameView = m_renderView.frameView();
1563 m_containerLayer->setSize(frameView->unscaledVisibleContentSize()); 1563 m_containerLayer->setSize(frameView->unscaledVisibleContentSize());
1564 } 1564 }
1565 } 1565 }
1566 1566
1567 bool RenderLayerCompositor::has3DContent() const 1567 bool RenderLayerCompositor::has3DContent() const
1568 { 1568 {
1569 return layerHas3DContent(rootRenderLayer()); 1569 return layerHas3DContent(rootRenderLayer());
1570 } 1570 }
1571 1571
1572 void RenderLayerCompositor::updateStyleDeterminedCompositingReasons(RenderLayer* layer)
1573 {
1574 CompositingReasons reasons = m_compositingReasonFinder.styleDeterminedReason s(layer->renderer());
1575 layer->setCompositingReasons(reasons, CompositingReasonComboAllStyleDetermin edReasons);
1576 }
1577
1572 void RenderLayerCompositor::updateDirectCompositingReasons(RenderLayer* layer) 1578 void RenderLayerCompositor::updateDirectCompositingReasons(RenderLayer* layer)
1573 { 1579 {
1574 CompositingReasons layerReasons = layer->compositingReasons(); 1580 CompositingReasons reasons = m_compositingReasonFinder.directReasons(layer, &m_needsToRecomputeCompositingRequirements);
1575 1581 layer->setCompositingReasons(reasons, CompositingReasonComboAllDirectReasons );
1576 layerReasons &= ~CompositingReasonComboAllDirectReasons;
1577 layerReasons |= m_compositingReasonFinder.directReasons(layer, &m_needsToRec omputeCompositingRequirements);
1578 layer->setCompositingReasons(layerReasons);
1579 } 1582 }
1580 1583
1581 bool RenderLayerCompositor::needsOwnBacking(const RenderLayer* layer) const 1584 bool RenderLayerCompositor::needsOwnBacking(const RenderLayer* layer) const
1582 { 1585 {
1583 if (!canBeComposited(layer)) 1586 if (!canBeComposited(layer))
1584 return false; 1587 return false;
1585 1588
1586 // If squashing is disabled, then layers that would have been squashed shoul d just be separately composited. 1589 // If squashing is disabled, then layers that would have been squashed shoul d just be separately composited.
1587 bool needsOwnBackingForDisabledSquashing = !layerSquashingEnabled() && requi resSquashing(layer->compositingReasons()); 1590 bool needsOwnBackingForDisabledSquashing = !layerSquashingEnabled() && requi resSquashing(layer->compositingReasons());
1588 1591
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after
2260 } else if (graphicsLayer == m_scrollLayer.get()) { 2263 } else if (graphicsLayer == m_scrollLayer.get()) {
2261 name = "LocalFrame Scrolling Layer"; 2264 name = "LocalFrame Scrolling Layer";
2262 } else { 2265 } else {
2263 ASSERT_NOT_REACHED(); 2266 ASSERT_NOT_REACHED();
2264 } 2267 }
2265 2268
2266 return name; 2269 return name;
2267 } 2270 }
2268 2271
2269 } // namespace WebCore 2272 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/compositing/RenderLayerCompositor.h ('k') | Source/platform/graphics/CompositingReasons.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698