Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights |
| 3 * reserved. | 3 * reserved. |
| 4 * | 4 * |
| 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
| 6 * | 6 * |
| 7 * Other contributors: | 7 * Other contributors: |
| 8 * Robert O'Callahan <roc+@cs.cmu.edu> | 8 * Robert O'Callahan <roc+@cs.cmu.edu> |
| 9 * David Baron <dbaron@fas.harvard.edu> | 9 * David Baron <dbaron@fas.harvard.edu> |
| 10 * Christian Biesinger <cbiesinger@web.de> | 10 * Christian Biesinger <cbiesinger@web.de> |
| (...skipping 2606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2617 default: | 2617 default: |
| 2618 return (obj != layoutObject() && | 2618 return (obj != layoutObject() && |
| 2619 compositedLayerMapping()->scrollingContentsLayer()) | 2619 compositedLayerMapping()->scrollingContentsLayer()) |
| 2620 ? compositedLayerMapping()->scrollingContentsLayer() | 2620 ? compositedLayerMapping()->scrollingContentsLayer() |
| 2621 : compositedLayerMapping()->mainGraphicsLayer(); | 2621 : compositedLayerMapping()->mainGraphicsLayer(); |
| 2622 } | 2622 } |
| 2623 } | 2623 } |
| 2624 | 2624 |
| 2625 BackgroundPaintLocation PaintLayer::backgroundPaintLocation( | 2625 BackgroundPaintLocation PaintLayer::backgroundPaintLocation( |
| 2626 uint32_t* reasons) const { | 2626 uint32_t* reasons) const { |
| 2627 BackgroundPaintLocation location = | 2627 BackgroundPaintLocation location = BackgroundPaintInGraphicsLayer; |
| 2628 isRootLayer() || !scrollsOverflow() | 2628 if (scrollsOverflow()) { |
| 2629 ? BackgroundPaintInGraphicsLayer | 2629 if (RuntimeEnabledFeatures::rootLayerScrollingEnabled() || !isRootLayer()) { |
|
flackr
2017/01/26 00:03:16
I wonder if this check is really necessary? The sc
| |
| 2630 : layoutObject()->backgroundPaintLocation(reasons); | 2630 location = layoutObject()->backgroundPaintLocation(reasons); |
| 2631 } | |
| 2632 } | |
| 2633 | |
| 2631 m_stackingNode->updateLayerListsIfNeeded(); | 2634 m_stackingNode->updateLayerListsIfNeeded(); |
| 2632 if (m_stackingNode->hasNegativeZOrderList()) | 2635 if (m_stackingNode->hasNegativeZOrderList()) |
| 2633 location = BackgroundPaintInGraphicsLayer; | 2636 location = BackgroundPaintInGraphicsLayer; |
|
flackr
2017/01/26 00:03:16
This seems wrong, do we actually create a layer be
| |
| 2634 return location; | 2637 return location; |
| 2635 } | 2638 } |
| 2636 | 2639 |
| 2637 void PaintLayer::ensureCompositedLayerMapping() { | 2640 void PaintLayer::ensureCompositedLayerMapping() { |
| 2638 if (m_rareData && m_rareData->compositedLayerMapping) | 2641 if (m_rareData && m_rareData->compositedLayerMapping) |
| 2639 return; | 2642 return; |
| 2640 | 2643 |
| 2641 ensureRareData().compositedLayerMapping = | 2644 ensureRareData().compositedLayerMapping = |
| 2642 WTF::wrapUnique(new CompositedLayerMapping(*this)); | 2645 WTF::wrapUnique(new CompositedLayerMapping(*this)); |
| 2643 m_rareData->compositedLayerMapping->setNeedsGraphicsLayerUpdate( | 2646 m_rareData->compositedLayerMapping->setNeedsGraphicsLayerUpdate( |
| (...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3235 } | 3238 } |
| 3236 | 3239 |
| 3237 void showLayerTree(const blink::LayoutObject* layoutObject) { | 3240 void showLayerTree(const blink::LayoutObject* layoutObject) { |
| 3238 if (!layoutObject) { | 3241 if (!layoutObject) { |
| 3239 LOG(INFO) << "Cannot showLayerTree. Root is (nil)"; | 3242 LOG(INFO) << "Cannot showLayerTree. Root is (nil)"; |
| 3240 return; | 3243 return; |
| 3241 } | 3244 } |
| 3242 showLayerTree(layoutObject->enclosingLayer()); | 3245 showLayerTree(layoutObject->enclosingLayer()); |
| 3243 } | 3246 } |
| 3244 #endif | 3247 #endif |
| OLD | NEW |