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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 } | 42 } |
43 | 43 |
44 void PrintTo(const PaintChunk& chunk, std::ostream* os) | 44 void PrintTo(const PaintChunk& chunk, std::ostream* os) |
45 { | 45 { |
46 *os << "PaintChunk(begin=" << chunk.beginIndex | 46 *os << "PaintChunk(begin=" << chunk.beginIndex |
47 << ", end=" << chunk.endIndex | 47 << ", end=" << chunk.endIndex |
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 << ")"; | 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 if (properties.transform) { | 58 if (properties.transform) { |
59 *os << "transform="; | 59 *os << "transform="; |
60 PrintTo(*properties.transform, os); | 60 PrintTo(*properties.transform, os); |
61 } | 61 } |
62 *os << ")"; | 62 *os << ")"; |
63 } | 63 } |
64 | 64 |
65 void PrintTo(const TransformPaintPropertyNode& transformPaintProperty, std::ostr
eam* os) | 65 void PrintTo(const TransformPaintPropertyNode& transformPaintProperty, std::ostr
eam* os) |
66 { | 66 { |
67 *os << "TransformPaintPropertyNode(matrix="; | 67 *os << "TransformPaintPropertyNode(matrix="; |
68 PrintTo(transformPaintProperty.matrix(), os); | 68 PrintTo(transformPaintProperty.matrix(), os); |
69 *os << ", origin="; | 69 *os << ", origin="; |
70 PrintTo(transformPaintProperty.origin(), os); | 70 PrintTo(transformPaintProperty.origin(), os); |
71 *os << ")"; | 71 *os << ")"; |
72 } | 72 } |
73 | 73 |
74 void PrintTo(const EffectPaintPropertyNode& effect, std::ostream* os) | 74 void PrintTo(const EffectPaintPropertyNode& effect, std::ostream* os) |
75 { | 75 { |
76 *os << "EffectPaintPropertyNode(opacity=" << effect.opacity() << ")"; | 76 *os << "EffectPaintPropertyNode(opacity=" << effect.opacity() << ")"; |
77 } | 77 } |
78 | 78 |
79 } // namespace blink | 79 } // namespace blink |
OLD | NEW |