Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1287)

Side by Side Diff: third_party/WebKit/Source/platform/graphics/paint/PaintChunkProperties.h

Issue 1397583002: Implement the framework for a paint property hierarchy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Job insecurity: better tests, better comments, better names. Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698