| 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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* scrollTranslation = paintPropertie
s.scrollTranslation()) | 102 if (const TransformPaintPropertyNode* scrollTranslation = paintPropertie
s.scrollTranslation()) |
| 103 printer.addPropertyNode(scrollTranslation, "ScrollTranslation"); | 103 printer.addPropertyNode(scrollTranslation, "ScrollTranslation"); |
| 104 if (const TransformPaintPropertyNode* transformForLayerContents = paintP
roperties.transformForLayerContents()) | |
| 105 printer.addPropertyNode(transformForLayerContents, "TransformForLaye
rContents"); | |
| 106 } | 104 } |
| 107 | 105 |
| 108 static void printNodeAsString(const TransformPaintPropertyNode* node, String
Builder& stringBuilder) | 106 static void printNodeAsString(const TransformPaintPropertyNode* node, String
Builder& stringBuilder) |
| 109 { | 107 { |
| 110 stringBuilder.append(" transform="); | 108 stringBuilder.append(" transform="); |
| 111 | 109 |
| 112 TransformationMatrix::DecomposedType decomposition; | 110 TransformationMatrix::DecomposedType decomposition; |
| 113 if (!node->matrix().decompose(decomposition)) { | 111 if (!node->matrix().decompose(decomposition)) { |
| 114 stringBuilder.append("degenerate"); | 112 stringBuilder.append("degenerate"); |
| 115 return; | 113 return; |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 | 184 |
| 187 void showEffectPropertyTree(const FrameView& rootFrame) | 185 void showEffectPropertyTree(const FrameView& rootFrame) |
| 188 { | 186 { |
| 189 ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled()); | 187 ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled()); |
| 190 PropertyTreePrinter<EffectPaintPropertyNode>(rootFrame).show(); | 188 PropertyTreePrinter<EffectPaintPropertyNode>(rootFrame).show(); |
| 191 } | 189 } |
| 192 | 190 |
| 193 } // namespace blink | 191 } // namespace blink |
| 194 | 192 |
| 195 #endif | 193 #endif |
| OLD | NEW |