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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintLayer.cpp

Issue 1425593007: Separate display item clients for negative and normal/positive z-order children (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Struct DisplayItemClient Created 5 years, 1 month 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
OLDNEW
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 2698 matching lines...) Expand 10 before | Expand all | Expand 10 after
2709 } 2709 }
2710 } 2710 }
2711 2711
2712 void PaintLayer::clearNeedsRepaintRecursively() 2712 void PaintLayer::clearNeedsRepaintRecursively()
2713 { 2713 {
2714 for (PaintLayer* child = firstChild(); child; child = child->nextSibling()) 2714 for (PaintLayer* child = firstChild(); child; child = child->nextSibling())
2715 child->clearNeedsRepaintRecursively(); 2715 child->clearNeedsRepaintRecursively();
2716 m_needsRepaint = false; 2716 m_needsRepaint = false;
2717 } 2717 }
2718 2718
2719 static String debugNameForNegativeZOrderChildrenDisplayItemClient(const PaintLay er& layer)
2720 {
2721 return layer.debugName() + " negative z-order children";
2722 }
2723
2724 static String debugNameForNormalAndPositiveZOrderChildrenDisplayItemClient(const PaintLayer& layer)
2725 {
2726 return layer.debugName() + " normal and positive z-order children";
2727 }
2728
2729 DisplayItemClientWrapper PaintLayer::displayItemClientForNegativeZOrderChildren( ) const
2730 {
2731 return DisplayItemClientWrapper(*this, toSubDisplayItemClient(this, 1), debu gNameForNegativeZOrderChildrenDisplayItemClient);
2732 }
2733
2734 DisplayItemClientWrapper PaintLayer::displayItemClientForNormalAndPositiveZOrder Children() const
2735 {
2736 return DisplayItemClientWrapper(*this, toSubDisplayItemClient(this, 2), debu gNameForNormalAndPositiveZOrderChildrenDisplayItemClient);
2737 }
2738
2719 DisableCompositingQueryAsserts::DisableCompositingQueryAsserts() 2739 DisableCompositingQueryAsserts::DisableCompositingQueryAsserts()
2720 : m_disabler(gCompositingQueryMode, CompositingQueriesAreAllowed) { } 2740 : m_disabler(gCompositingQueryMode, CompositingQueriesAreAllowed) { }
2721 2741
2722 } // namespace blink 2742 } // namespace blink
2723 2743
2724 #ifndef NDEBUG 2744 #ifndef NDEBUG
2725 // FIXME: Rename? 2745 // FIXME: Rename?
2726 void showLayerTree(const blink::PaintLayer* layer) 2746 void showLayerTree(const blink::PaintLayer* layer)
2727 { 2747 {
2728 if (!layer) { 2748 if (!layer) {
2729 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); 2749 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n");
2730 return; 2750 return;
2731 } 2751 }
2732 2752
2733 if (blink::LocalFrame* frame = layer->layoutObject()->frame()) { 2753 if (blink::LocalFrame* frame = layer->layoutObject()->frame()) {
2734 WTF::String output = externalRepresentation(frame, blink::LayoutAsTextSh owAllLayers | blink::LayoutAsTextShowLayerNesting | blink::LayoutAsTextShowCompo sitedLayers | blink::LayoutAsTextShowAddresses | blink::LayoutAsTextShowIDAndCla ss | blink::LayoutAsTextDontUpdateLayout | blink::LayoutAsTextShowLayoutState); 2754 WTF::String output = externalRepresentation(frame, blink::LayoutAsTextSh owAllLayers | blink::LayoutAsTextShowLayerNesting | blink::LayoutAsTextShowCompo sitedLayers | blink::LayoutAsTextShowAddresses | blink::LayoutAsTextShowIDAndCla ss | blink::LayoutAsTextDontUpdateLayout | blink::LayoutAsTextShowLayoutState);
2735 fprintf(stderr, "%s\n", output.utf8().data()); 2755 fprintf(stderr, "%s\n", output.utf8().data());
2736 } 2756 }
2737 } 2757 }
2738 2758
2739 void showLayerTree(const blink::LayoutObject* layoutObject) 2759 void showLayerTree(const blink::LayoutObject* layoutObject)
2740 { 2760 {
2741 if (!layoutObject) { 2761 if (!layoutObject) {
2742 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); 2762 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n");
2743 return; 2763 return;
2744 } 2764 }
2745 showLayerTree(layoutObject->enclosingLayer()); 2765 showLayerTree(layoutObject->enclosingLayer());
2746 } 2766 }
2747 #endif 2767 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayer.h ('k') | third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698