| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef PaintChunkProperties_h |
| 6 #define PaintChunkProperties_h |
| 7 |
| 8 #include "platform/graphics/paint/TransformPaintPropertyNode.h" |
| 9 |
| 10 #include <iosfwd> |
| 11 |
| 12 namespace blink { |
| 13 |
| 14 // The set of paint properties applying to a |PaintChunk|. These properties are |
| 15 // not local-only paint style parameters such as color, but instead represent |
| 16 // the hierarchy of transforms, clips, effects, etc, that apply to a contiguous |
| 17 // chunk of display items. A single DisplayItemClient can generate multiple |
| 18 // properties of the same type and this struct represents the total state of all |
| 19 // properties for a given |PaintChunk|. |
| 20 // |
| 21 // This differs from |ObjectPaintProperties| because it only stores one property |
| 22 // for each type (e.g., either transform or perspective, but not both). |
| 23 struct PaintChunkProperties { |
| 24 // TODO(pdr): Add clip, scroll, and effect properties. |
| 25 RefPtr<TransformPaintPropertyNode> transform; |
| 26 }; |
| 27 |
| 28 // Equality is based only on the pointers and is not 'deep' which would require |
| 29 // crawling the entire property tree to compute. |
| 30 inline bool operator==(const PaintChunkProperties& a, const PaintChunkProperties
& b) |
| 31 { |
| 32 return a.transform.get() == b.transform.get(); |
| 33 } |
| 34 |
| 35 inline bool operator!=(const PaintChunkProperties& a, const PaintChunkProperties
& b) |
| 36 { |
| 37 return !(a == b); |
| 38 } |
| 39 |
| 40 // Redeclared here to avoid ODR issues. |
| 41 // See platform/testing/PaintPrinters.h. |
| 42 void PrintTo(const PaintChunkProperties&, std::ostream*); |
| 43 |
| 44 } // namespace blink |
| 45 |
| 46 #endif // PaintChunkProperties_h |
| OLD | NEW |