Chromium Code Reviews| Index: third_party/WebKit/Source/core/paint/ObjectPaintProperties.h |
| diff --git a/third_party/WebKit/Source/core/paint/ObjectPaintProperties.h b/third_party/WebKit/Source/core/paint/ObjectPaintProperties.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..cba8a9c36e8fdd2f1e5d2ebe2ea16decba4d7d85 |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/core/paint/ObjectPaintProperties.h |
| @@ -0,0 +1,45 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef ObjectPaintProperties_h |
| +#define ObjectPaintProperties_h |
| + |
| +#include "platform/graphics/paint/TransformPaintPropertyNode.h" |
| +#include "wtf/PassRefPtr.h" |
| +#include "wtf/RefPtr.h" |
| + |
| +namespace blink { |
| + |
| +// The minimal set of paint properties created by a |LayoutObject|. These |
| +// properties encode a hierachy of transforms, clips, effects, etc, both between |
| +// LayoutObjects (each property has a parent) and among the properties of a |
| +// single LayoutObject (e.g., transform and perspective with the correct parent |
| +// relationship to represent ordering). |
| +class ObjectPaintProperties { |
|
chrishtr
2015/10/07 20:55:56
How about getting rid of this class and using grap
|
| + WTF_MAKE_NONCOPYABLE(ObjectPaintProperties); |
| + WTF_MAKE_FAST_ALLOCATED(ObjectPaintProperties); |
| +public: |
| + static PassOwnPtr<ObjectPaintProperties> create() |
| + { |
| + return adoptPtr(new ObjectPaintProperties()); |
| + } |
| + |
| + bool hasTransform() const { return m_transform; } |
| + void setTransform(PassRefPtr<TransformPaintPropertyNode> transform) { m_transform = transform; } |
| + TransformPaintPropertyNode* transform() { return m_transform.get(); } |
| + |
| + bool hasPerspective() const { return m_perspective; } |
| + void setPerspective(PassRefPtr<TransformPaintPropertyNode> perspective) { m_perspective = perspective; } |
| + TransformPaintPropertyNode* perspective() { return m_perspective.get(); } |
| + |
| +private: |
| + ObjectPaintProperties() { } |
| + |
| + RefPtr<TransformPaintPropertyNode> m_transform; |
| + RefPtr<TransformPaintPropertyNode> m_perspective; |
| +}; |
| + |
| +} // namespace blink |
| + |
| +#endif // ObjectPaintProperties_h |