| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 2622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2708 if (container->m_needsRepaint) | 2707 if (container->m_needsRepaint) |
| 2709 break; | 2708 break; |
| 2710 container->m_needsRepaint = true; | 2709 container->m_needsRepaint = true; |
| 2711 } | 2710 } |
| 2712 if (container->compositingState() != NotComposited) | 2711 if (container->compositingState() != NotComposited) |
| 2713 break; | 2712 break; |
| 2714 layer = container; | 2713 layer = container; |
| 2715 } | 2714 } |
| 2716 } | 2715 } |
| 2717 | 2716 |
| 2718 ObjectPaintProperties& PaintLayer::mutablePaintProperties() | |
| 2719 { | |
| 2720 ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled()); | |
| 2721 ASSERT(layoutObject()->document().lifecycle().state() == DocumentLifecycle::
InUpdatePaintProperties); | |
| 2722 if (!m_paintProperties) | |
| 2723 m_paintProperties = ObjectPaintProperties::create(); | |
| 2724 return *m_paintProperties; | |
| 2725 } | |
| 2726 | |
| 2727 const ObjectPaintProperties* PaintLayer::paintProperties() const | |
| 2728 { | |
| 2729 ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled()); | |
| 2730 ASSERT(layoutObject()->document().lifecycle().state() == DocumentLifecycle::
InPaint); | |
| 2731 return m_paintProperties.get(); | |
| 2732 } | |
| 2733 | |
| 2734 DisableCompositingQueryAsserts::DisableCompositingQueryAsserts() | 2717 DisableCompositingQueryAsserts::DisableCompositingQueryAsserts() |
| 2735 : m_disabler(gCompositingQueryMode, CompositingQueriesAreAllowed) { } | 2718 : m_disabler(gCompositingQueryMode, CompositingQueriesAreAllowed) { } |
| 2736 | 2719 |
| 2737 } // namespace blink | 2720 } // namespace blink |
| 2738 | 2721 |
| 2739 #ifndef NDEBUG | 2722 #ifndef NDEBUG |
| 2740 // FIXME: Rename? | 2723 // FIXME: Rename? |
| 2741 void showLayerTree(const blink::PaintLayer* layer) | 2724 void showLayerTree(const blink::PaintLayer* layer) |
| 2742 { | 2725 { |
| 2743 if (!layer) { | 2726 if (!layer) { |
| 2744 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); | 2727 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); |
| 2745 return; | 2728 return; |
| 2746 } | 2729 } |
| 2747 | 2730 |
| 2748 if (blink::LocalFrame* frame = layer->layoutObject()->frame()) { | 2731 if (blink::LocalFrame* frame = layer->layoutObject()->frame()) { |
| 2749 WTF::String output = externalRepresentation(frame, blink::LayoutAsTextSh
owAllLayers | blink::LayoutAsTextShowLayerNesting | blink::LayoutAsTextShowCompo
sitedLayers | blink::LayoutAsTextShowAddresses | blink::LayoutAsTextShowIDAndCla
ss | blink::LayoutAsTextDontUpdateLayout | blink::LayoutAsTextShowLayoutState); | 2732 WTF::String output = externalRepresentation(frame, blink::LayoutAsTextSh
owAllLayers | blink::LayoutAsTextShowLayerNesting | blink::LayoutAsTextShowCompo
sitedLayers | blink::LayoutAsTextShowAddresses | blink::LayoutAsTextShowIDAndCla
ss | blink::LayoutAsTextDontUpdateLayout | blink::LayoutAsTextShowLayoutState); |
| 2750 fprintf(stderr, "%s\n", output.utf8().data()); | 2733 fprintf(stderr, "%s\n", output.utf8().data()); |
| 2751 } | 2734 } |
| 2752 } | 2735 } |
| 2753 | 2736 |
| 2754 void showLayerTree(const blink::LayoutObject* layoutObject) | 2737 void showLayerTree(const blink::LayoutObject* layoutObject) |
| 2755 { | 2738 { |
| 2756 if (!layoutObject) { | 2739 if (!layoutObject) { |
| 2757 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); | 2740 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); |
| 2758 return; | 2741 return; |
| 2759 } | 2742 } |
| 2760 showLayerTree(layoutObject->enclosingLayer()); | 2743 showLayerTree(layoutObject->enclosingLayer()); |
| 2761 } | 2744 } |
| 2762 #endif | 2745 #endif |
| OLD | NEW |