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

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

Issue 1390123002: (WIP) Paint property hierarchy approach 1 of 2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
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 #ifndef PaintProperties_h 5 #ifndef PaintProperties_h
6 #define PaintProperties_h 6 #define PaintProperties_h
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 9
10 namespace blink { 10 namespace blink {
11 11
12 // The set of paint properties applying to a |PaintChunk|. 12 // The set of paint properties applying to a |PaintChunk|. Each property index
13 // In particular, this does not mean properties like background-color, but 13 // maps back to a paint property in the |PaintArtifact|'s property vectors.
14 // rather the hierarchy of transforms, clips, effects, etc. that apply to a 14 // These properties are not simple color changes but instead represent the
15 // contiguous chunk of drawings. 15 // hierachy of transforms, clips, effects, etc, that apply to a contiguous
16 // chunk of display items.
16 struct PaintProperties { 17 struct PaintProperties {
17 // TODO(jbroman): Add actual properties. 18 // TODO(pdr): Add clip, scroll, and effect property indices.
19 size_t transformIndex;
18 }; 20 };
19 21
20 inline bool operator==(const PaintProperties&, const PaintProperties&) 22 inline bool operator==(const PaintProperties& a, const PaintProperties& b)
21 { 23 {
22 return true; 24 return a.transformIndex == b.transformIndex;
23 } 25 }
24 26
25 inline bool operator!=(const PaintProperties& a, const PaintProperties& b) 27 inline bool operator!=(const PaintProperties& a, const PaintProperties& b)
26 { 28 {
27 return !(a == b); 29 return !(a == b);
28 } 30 }
29 31
30 // Redeclared here to avoid ODR issues. 32 // Redeclared here to avoid ODR issues.
31 // See platform/testing/PaintPrinters.h. 33 // See platform/testing/PaintPrinters.h.
32 void PrintTo(const PaintProperties&, std::ostream*); 34 void PrintTo(const PaintProperties&, std::ostream*);
33 35
34 } // namespace blink 36 } // namespace blink
35 37
36 #endif // PaintProperties_h 38 #endif // PaintProperties_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698