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

Side by Side Diff: third_party/WebKit/Source/core/paint/ObjectPaintProperties.h

Issue 1397583002: Implement the framework for a paint property hierarchy (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
(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 ObjectPaintProperties_h
6 #define ObjectPaintProperties_h
7
8 #include "platform/graphics/paint/TransformPaintPropertyNode.h"
9 #include "wtf/PassRefPtr.h"
10 #include "wtf/RefPtr.h"
11
12 namespace blink {
13
14 // The minimal set of paint properties created by a |LayoutObject|. These
15 // properties encode a hierachy of transforms, clips, effects, etc, both between
16 // LayoutObjects (each property has a parent) and among the properties of a
17 // single LayoutObject (e.g., transform and perspective with the correct parent
18 // relationship to represent ordering).
19 class ObjectPaintProperties {
chrishtr 2015/10/07 20:55:56 How about getting rid of this class and using grap
20 WTF_MAKE_NONCOPYABLE(ObjectPaintProperties);
21 WTF_MAKE_FAST_ALLOCATED(ObjectPaintProperties);
22 public:
23 static PassOwnPtr<ObjectPaintProperties> create()
24 {
25 return adoptPtr(new ObjectPaintProperties());
26 }
27
28 bool hasTransform() const { return m_transform; }
29 void setTransform(PassRefPtr<TransformPaintPropertyNode> transform) { m_tran sform = transform; }
30 TransformPaintPropertyNode* transform() { return m_transform.get(); }
31
32 bool hasPerspective() const { return m_perspective; }
33 void setPerspective(PassRefPtr<TransformPaintPropertyNode> perspective) { m_ perspective = perspective; }
34 TransformPaintPropertyNode* perspective() { return m_perspective.get(); }
35
36 private:
37 ObjectPaintProperties() { }
38
39 RefPtr<TransformPaintPropertyNode> m_transform;
40 RefPtr<TransformPaintPropertyNode> m_perspective;
41 };
42
43 } // namespace blink
44
45 #endif // ObjectPaintProperties_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698