OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
5 * | 5 * |
6 * Other contributors: | 6 * Other contributors: |
7 * Robert O'Callahan <roc+@cs.cmu.edu> | 7 * Robert O'Callahan <roc+@cs.cmu.edu> |
8 * David Baron <dbaron@fas.harvard.edu> | 8 * David Baron <dbaron@fas.harvard.edu> |
9 * Christian Biesinger <cbiesinger@web.de> | 9 * Christian Biesinger <cbiesinger@web.de> |
10 * Randall Jesup <rjesup@wgate.com> | 10 * Randall Jesup <rjesup@wgate.com> |
(...skipping 2675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2686 | 2686 |
2687 // Do this unconditionally to ensure container chain is marked when composit ing status of the layer changes. | 2687 // Do this unconditionally to ensure container chain is marked when composit ing status of the layer changes. |
2688 layer->markAncestorChainForNeedsRepaint(); | 2688 layer->markAncestorChainForNeedsRepaint(); |
2689 } | 2689 } |
2690 | 2690 |
2691 void PaintLayer::markAncestorChainForNeedsRepaint() | 2691 void PaintLayer::markAncestorChainForNeedsRepaint() |
2692 { | 2692 { |
2693 // Need to access compositingState(). We've ensured correct flag setting whe n compositingState() changes. | 2693 // Need to access compositingState(). We've ensured correct flag setting whe n compositingState() changes. |
2694 DisableCompositingQueryAsserts disabler; | 2694 DisableCompositingQueryAsserts disabler; |
2695 | 2695 |
2696 if (compositingState() != NotComposited) | 2696 if (compositingState() == PaintsIntoOwnBacking) |
chrishtr
2015/10/22 00:02:41
Not squashing?
Xianzhu
2015/10/22 01:17:04
We need to mark needsRepaint until real GraphicsLa
chrishtr
2015/10/23 17:15:06
Then you need to stop at squashing layers and mark
Xianzhu
2015/10/23 18:43:27
I realized this too :) Fixed in the patch set 7.
| |
2697 return; | 2697 return; |
2698 | 2698 |
2699 PaintLayer* layer = this; | 2699 PaintLayer* layer = this; |
2700 while (true) { | 2700 while (true) { |
2701 PaintLayer* container = layer->parent(); | 2701 PaintLayer* container = layer->parent(); |
2702 if (!container) { | 2702 if (!container) { |
2703 LayoutObject* owner = layer->layoutObject()->frame()->ownerLayoutObj ect(); | 2703 LayoutObject* owner = layer->layoutObject()->frame()->ownerLayoutObj ect(); |
2704 if (!owner) | 2704 if (!owner) |
2705 break; | 2705 break; |
2706 container = owner->enclosingLayer(); | 2706 container = owner->enclosingLayer(); |
2707 } | 2707 } |
2708 if (container->isSelfPaintingLayer() || container->hasSelfPaintingLayerD escendant()) { | 2708 if (container->isSelfPaintingLayer() || container->hasSelfPaintingLayerD escendant()) { |
2709 if (container->m_needsRepaint) | 2709 if (container->m_needsRepaint) |
2710 break; | 2710 break; |
2711 container->m_needsRepaint = true; | 2711 container->m_needsRepaint = true; |
2712 } | 2712 } |
2713 if (container->compositingState() != NotComposited) | 2713 if (container->compositingState() == PaintsIntoOwnBacking) |
2714 break; | 2714 break; |
2715 layer = container; | 2715 layer = container; |
2716 } | 2716 } |
2717 } | 2717 } |
2718 | 2718 |
2719 void PaintLayer::clearNeedsRepaintRecursively() | 2719 void PaintLayer::clearNeedsRepaintRecursively() |
2720 { | 2720 { |
2721 for (PaintLayer* child = firstChild(); child; child = child->nextSibling()) | 2721 for (PaintLayer* child = firstChild(); child; child = child->nextSibling()) |
2722 child->clearNeedsRepaintRecursively(); | 2722 child->clearNeedsRepaintRecursively(); |
2723 m_needsRepaint = false; | 2723 m_needsRepaint = false; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2761 | 2761 |
2762 void showLayerTree(const blink::LayoutObject* layoutObject) | 2762 void showLayerTree(const blink::LayoutObject* layoutObject) |
2763 { | 2763 { |
2764 if (!layoutObject) { | 2764 if (!layoutObject) { |
2765 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); | 2765 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); |
2766 return; | 2766 return; |
2767 } | 2767 } |
2768 showLayerTree(layoutObject->enclosingLayer()); | 2768 showLayerTree(layoutObject->enclosingLayer()); |
2769 } | 2769 } |
2770 #endif | 2770 #endif |
OLD | NEW |