| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "platform/testing/PaintPrinters.h" | 5 #include "platform/testing/PaintPrinters.h" |
| 6 | 6 |
| 7 #include "platform/graphics/paint/PaintChunk.h" | 7 #include "platform/graphics/paint/PaintChunk.h" |
| 8 #include "platform/graphics/paint/PaintChunkProperties.h" | 8 #include "platform/graphics/paint/PaintChunkProperties.h" |
| 9 #include <iomanip> // NOLINT | 9 #include <iomanip> // NOLINT |
| 10 #include <ostream> // NOLINT | 10 #include <ostream> // NOLINT |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 << ", props="; | 48 << ", props="; |
| 49 PrintTo(chunk.properties, os); | 49 PrintTo(chunk.properties, os); |
| 50 *os << ", bounds="; | 50 *os << ", bounds="; |
| 51 PrintTo(chunk.bounds, os); | 51 PrintTo(chunk.bounds, os); |
| 52 *os << ", knownToBeOpaque=" << chunk.knownToBeOpaque << ")"; | 52 *os << ", knownToBeOpaque=" << chunk.knownToBeOpaque << ")"; |
| 53 } | 53 } |
| 54 | 54 |
| 55 void PrintTo(const PaintChunkProperties& properties, std::ostream* os) | 55 void PrintTo(const PaintChunkProperties& properties, std::ostream* os) |
| 56 { | 56 { |
| 57 *os << "PaintChunkProperties("; | 57 *os << "PaintChunkProperties("; |
| 58 bool printedProperty = false; |
| 58 if (properties.transform) { | 59 if (properties.transform) { |
| 59 *os << "transform="; | 60 *os << "transform="; |
| 60 PrintTo(*properties.transform, os); | 61 PrintTo(*properties.transform, os); |
| 62 printedProperty = true; |
| 61 } | 63 } |
| 64 |
| 65 if (properties.clip) { |
| 66 if (printedProperty) |
| 67 *os << ", "; |
| 68 *os << "clip="; |
| 69 PrintTo(*properties.clip, os); |
| 70 printedProperty = true; |
| 71 } |
| 72 |
| 73 if (properties.effect) { |
| 74 if (printedProperty) |
| 75 *os << ", "; |
| 76 *os << "effect="; |
| 77 PrintTo(*properties.effect, os); |
| 78 printedProperty = true; |
| 79 } |
| 80 |
| 81 if (printedProperty) |
| 82 *os << ", "; |
| 83 *os << "backfaceHidden=" << properties.backfaceHidden; |
| 84 |
| 62 *os << ")"; | 85 *os << ")"; |
| 63 } | 86 } |
| 64 | 87 |
| 65 void PrintTo(const TransformPaintPropertyNode& transformPaintProperty, std::ostr
eam* os) | 88 void PrintTo(const TransformPaintPropertyNode& transformPaintProperty, std::ostr
eam* os) |
| 66 { | 89 { |
| 67 *os << "TransformPaintPropertyNode(matrix="; | 90 *os << "TransformPaintPropertyNode(matrix="; |
| 68 PrintTo(transformPaintProperty.matrix(), os); | 91 PrintTo(transformPaintProperty.matrix(), os); |
| 69 *os << ", origin="; | 92 *os << ", origin="; |
| 70 PrintTo(transformPaintProperty.origin(), os); | 93 PrintTo(transformPaintProperty.origin(), os); |
| 71 *os << ")"; | 94 *os << ")"; |
| 72 } | 95 } |
| 73 | 96 |
| 74 void PrintTo(const EffectPaintPropertyNode& effect, std::ostream* os) | 97 void PrintTo(const EffectPaintPropertyNode& effect, std::ostream* os) |
| 75 { | 98 { |
| 76 *os << "EffectPaintPropertyNode(opacity=" << effect.opacity() << ")"; | 99 *os << "EffectPaintPropertyNode(opacity=" << effect.opacity() << ")"; |
| 77 } | 100 } |
| 78 | 101 |
| 79 } // namespace blink | 102 } // namespace blink |
| OLD | NEW |