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

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

Issue 1407543003: Preliminary paint property walk implementation for SPv2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert forAllFrameViews change in FrameView.cpp. I don't know what I was thinking. Created 5 years, 2 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
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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 #include "core/layout/LayoutScrollbarPart.h" 65 #include "core/layout/LayoutScrollbarPart.h"
66 #include "core/layout/LayoutTreeAsText.h" 66 #include "core/layout/LayoutTreeAsText.h"
67 #include "core/layout/LayoutView.h" 67 #include "core/layout/LayoutView.h"
68 #include "core/layout/compositing/CompositedLayerMapping.h" 68 #include "core/layout/compositing/CompositedLayerMapping.h"
69 #include "core/layout/compositing/PaintLayerCompositor.h" 69 #include "core/layout/compositing/PaintLayerCompositor.h"
70 #include "core/layout/svg/LayoutSVGRoot.h" 70 #include "core/layout/svg/LayoutSVGRoot.h"
71 #include "core/layout/svg/ReferenceFilterBuilder.h" 71 #include "core/layout/svg/ReferenceFilterBuilder.h"
72 #include "core/page/Page.h" 72 #include "core/page/Page.h"
73 #include "core/page/scrolling/ScrollingCoordinator.h" 73 #include "core/page/scrolling/ScrollingCoordinator.h"
74 #include "core/paint/FilterEffectBuilder.h" 74 #include "core/paint/FilterEffectBuilder.h"
75 #include "core/paint/ObjectPaintProperties.h"
76 #include "platform/LengthFunctions.h" 75 #include "platform/LengthFunctions.h"
77 #include "platform/RuntimeEnabledFeatures.h" 76 #include "platform/RuntimeEnabledFeatures.h"
78 #include "platform/TraceEvent.h" 77 #include "platform/TraceEvent.h"
79 #include "platform/geometry/FloatPoint3D.h" 78 #include "platform/geometry/FloatPoint3D.h"
80 #include "platform/geometry/FloatRect.h" 79 #include "platform/geometry/FloatRect.h"
81 #include "platform/geometry/TransformState.h" 80 #include "platform/geometry/TransformState.h"
82 #include "platform/graphics/filters/Filter.h" 81 #include "platform/graphics/filters/Filter.h"
83 #include "platform/graphics/filters/SourceGraphic.h" 82 #include "platform/graphics/filters/SourceGraphic.h"
84 #include "platform/transforms/ScaleTransformOperation.h" 83 #include "platform/transforms/ScaleTransformOperation.h"
85 #include "platform/transforms/TransformationMatrix.h" 84 #include "platform/transforms/TransformationMatrix.h"
(...skipping 2630 matching lines...) Expand 10 before | Expand all | Expand 10 after
2716 } 2715 }
2717 } 2716 }
2718 2717
2719 void PaintLayer::clearNeedsRepaintRecursively() 2718 void PaintLayer::clearNeedsRepaintRecursively()
2720 { 2719 {
2721 for (PaintLayer* child = firstChild(); child; child = child->nextSibling()) 2720 for (PaintLayer* child = firstChild(); child; child = child->nextSibling())
2722 child->clearNeedsRepaintRecursively(); 2721 child->clearNeedsRepaintRecursively();
2723 m_needsRepaint = false; 2722 m_needsRepaint = false;
2724 } 2723 }
2725 2724
2726 ObjectPaintProperties& PaintLayer::mutablePaintProperties()
2727 {
2728 ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled());
2729 ASSERT(layoutObject()->document().lifecycle().state() == DocumentLifecycle:: InUpdatePaintProperties);
2730 if (!m_paintProperties)
2731 m_paintProperties = ObjectPaintProperties::create();
2732 return *m_paintProperties;
2733 }
2734
2735 const ObjectPaintProperties* PaintLayer::paintProperties() const
2736 {
2737 ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled());
2738 ASSERT(layoutObject()->document().lifecycle().state() == DocumentLifecycle:: InPaint);
2739 return m_paintProperties.get();
2740 }
2741
2742 DisableCompositingQueryAsserts::DisableCompositingQueryAsserts() 2725 DisableCompositingQueryAsserts::DisableCompositingQueryAsserts()
2743 : m_disabler(gCompositingQueryMode, CompositingQueriesAreAllowed) { } 2726 : m_disabler(gCompositingQueryMode, CompositingQueriesAreAllowed) { }
2744 2727
2745 } // namespace blink 2728 } // namespace blink
2746 2729
2747 #ifndef NDEBUG 2730 #ifndef NDEBUG
2748 // FIXME: Rename? 2731 // FIXME: Rename?
2749 void showLayerTree(const blink::PaintLayer* layer) 2732 void showLayerTree(const blink::PaintLayer* layer)
2750 { 2733 {
2751 if (!layer) { 2734 if (!layer) {
2752 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); 2735 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n");
2753 return; 2736 return;
2754 } 2737 }
2755 2738
2756 if (blink::LocalFrame* frame = layer->layoutObject()->frame()) { 2739 if (blink::LocalFrame* frame = layer->layoutObject()->frame()) {
2757 WTF::String output = externalRepresentation(frame, blink::LayoutAsTextSh owAllLayers | blink::LayoutAsTextShowLayerNesting | blink::LayoutAsTextShowCompo sitedLayers | blink::LayoutAsTextShowAddresses | blink::LayoutAsTextShowIDAndCla ss | blink::LayoutAsTextDontUpdateLayout | blink::LayoutAsTextShowLayoutState); 2740 WTF::String output = externalRepresentation(frame, blink::LayoutAsTextSh owAllLayers | blink::LayoutAsTextShowLayerNesting | blink::LayoutAsTextShowCompo sitedLayers | blink::LayoutAsTextShowAddresses | blink::LayoutAsTextShowIDAndCla ss | blink::LayoutAsTextDontUpdateLayout | blink::LayoutAsTextShowLayoutState);
2758 fprintf(stderr, "%s\n", output.utf8().data()); 2741 fprintf(stderr, "%s\n", output.utf8().data());
2759 } 2742 }
2760 } 2743 }
2761 2744
2762 void showLayerTree(const blink::LayoutObject* layoutObject) 2745 void showLayerTree(const blink::LayoutObject* layoutObject)
2763 { 2746 {
2764 if (!layoutObject) { 2747 if (!layoutObject) {
2765 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); 2748 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n");
2766 return; 2749 return;
2767 } 2750 }
2768 showLayerTree(layoutObject->enclosingLayer()); 2751 showLayerTree(layoutObject->enclosingLayer());
2769 } 2752 }
2770 #endif 2753 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayer.h ('k') | third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698