| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/paint/PaintPropertyTreePrinter.h" | 5 #include "core/paint/PaintPropertyTreePrinter.h" |
| 6 | 6 |
| 7 #include "core/frame/FrameView.h" | 7 #include "core/frame/FrameView.h" |
| 8 #include "core/layout/LayoutView.h" | 8 #include "core/layout/LayoutView.h" |
| 9 #include "core/paint/ObjectPaintProperties.h" | 9 #include "core/paint/ObjectPaintProperties.h" |
| 10 | 10 |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 } | 92 } |
| 93 | 93 |
| 94 static void addObjectPaintProperties(const ObjectPaintProperties& paintPrope
rties, PropertyTreePrinter<TransformPaintPropertyNode>& printer) | 94 static void addObjectPaintProperties(const ObjectPaintProperties& paintPrope
rties, PropertyTreePrinter<TransformPaintPropertyNode>& printer) |
| 95 { | 95 { |
| 96 if (const TransformPaintPropertyNode* paintOffsetTranslation = paintProp
erties.paintOffsetTranslation()) | 96 if (const TransformPaintPropertyNode* paintOffsetTranslation = paintProp
erties.paintOffsetTranslation()) |
| 97 printer.addPropertyNode(paintOffsetTranslation, "PaintOffsetTranslat
ion"); | 97 printer.addPropertyNode(paintOffsetTranslation, "PaintOffsetTranslat
ion"); |
| 98 if (const TransformPaintPropertyNode* transform = paintProperties.transf
orm()) | 98 if (const TransformPaintPropertyNode* transform = paintProperties.transf
orm()) |
| 99 printer.addPropertyNode(transform, "Transform"); | 99 printer.addPropertyNode(transform, "Transform"); |
| 100 if (const TransformPaintPropertyNode* perspective = paintProperties.pers
pective()) | 100 if (const TransformPaintPropertyNode* perspective = paintProperties.pers
pective()) |
| 101 printer.addPropertyNode(perspective, "Perspective"); | 101 printer.addPropertyNode(perspective, "Perspective"); |
| 102 if (const TransformPaintPropertyNode* svgLocalTransform = paintPropertie
s.svgLocalTransform()) |
| 103 printer.addPropertyNode(svgLocalTransform, "SvgLocalTransform"); |
| 102 if (const TransformPaintPropertyNode* scrollTranslation = paintPropertie
s.scrollTranslation()) | 104 if (const TransformPaintPropertyNode* scrollTranslation = paintPropertie
s.scrollTranslation()) |
| 103 printer.addPropertyNode(scrollTranslation, "ScrollTranslation"); | 105 printer.addPropertyNode(scrollTranslation, "ScrollTranslation"); |
| 106 if (const TransformPaintPropertyNode* scrollbarPaintOffset = paintProper
ties.scrollbarPaintOffset()) |
| 107 printer.addPropertyNode(scrollbarPaintOffset, "ScrollbarPaintOffset"
); |
| 104 } | 108 } |
| 105 | 109 |
| 106 static void printNodeAsString(const TransformPaintPropertyNode* node, String
Builder& stringBuilder) | 110 static void printNodeAsString(const TransformPaintPropertyNode* node, String
Builder& stringBuilder) |
| 107 { | 111 { |
| 108 stringBuilder.append(" transform="); | 112 stringBuilder.append(" transform="); |
| 109 | 113 |
| 110 TransformationMatrix::DecomposedType decomposition; | 114 TransformationMatrix::DecomposedType decomposition; |
| 111 if (!node->matrix().decompose(decomposition)) { | 115 if (!node->matrix().decompose(decomposition)) { |
| 112 stringBuilder.append("degenerate"); | 116 stringBuilder.append("degenerate"); |
| 113 return; | 117 return; |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 | 188 |
| 185 void showEffectPropertyTree(const FrameView& rootFrame) | 189 void showEffectPropertyTree(const FrameView& rootFrame) |
| 186 { | 190 { |
| 187 ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled()); | 191 ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled()); |
| 188 PropertyTreePrinter<EffectPaintPropertyNode>(rootFrame).show(); | 192 PropertyTreePrinter<EffectPaintPropertyNode>(rootFrame).show(); |
| 189 } | 193 } |
| 190 | 194 |
| 191 } // namespace blink | 195 } // namespace blink |
| 192 | 196 |
| 193 #endif | 197 #endif |
| OLD | NEW |