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

Unified Diff: third_party/WebKit/Source/core/paint/ObjectPaintProperties.h

Issue 1390933003: Implement the framework for the 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 side-by-side diff with in-line comments
Download patch
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..c1933459844f80c9b7ebd2eff6378477181ff79c
--- /dev/null
+++ b/third_party/WebKit/Source/core/paint/ObjectPaintProperties.h
@@ -0,0 +1,38 @@
+// 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/TransformPaintProperty.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 {
+public:
+ ObjectPaintProperties() { }
+
+ bool hasTransform() const { return m_transform; }
+ void setTransform(PassRefPtr<TransformPaintProperty> transform) { m_transform = transform; }
+ TransformPaintProperty* transform() { return m_transform.get(); }
+
+ bool hasPerspective() const { return m_perspective; }
+ void setPerspective(PassRefPtr<TransformPaintProperty> perspective) { m_perspective = perspective; }
+ TransformPaintProperty* perspective() { return m_perspective.get(); }
+
+private:
+ RefPtr<TransformPaintProperty> m_transform;
+ RefPtr<TransformPaintProperty> m_perspective;
+};
+
+} // namespace blink
+
+#endif // ObjectPaintProperties_h

Powered by Google App Engine
This is Rietveld 408576698