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

Unified Diff: Source/core/paint/BoxPainter.h

Issue 550363004: Factor painting code out of RenderBox into a new class called BoxPainter. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix Created 6 years, 3 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
« no previous file with comments | « Source/core/paint/BoxDecorationData.cpp ('k') | Source/core/paint/BoxPainter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/BoxPainter.h
diff --git a/Source/core/paint/BoxPainter.h b/Source/core/paint/BoxPainter.h
new file mode 100644
index 0000000000000000000000000000000000000000..b67912d3848d5424b8f6f09dd59bd3e5f9c0acfc
--- /dev/null
+++ b/Source/core/paint/BoxPainter.h
@@ -0,0 +1,40 @@
+// Copyright 2014 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 BoxPainter_h
+#define BoxPainter_h
+
+#include "core/rendering/RenderBoxModelObject.h"
+
+namespace blink {
+
+class LayoutPoint;
+struct PaintInfo;
+class RenderBox;
+class RenderObject;
+
+class BoxPainter {
+public:
+ BoxPainter(RenderBox& renderBox) : m_renderBox(renderBox) { }
+ void paint(PaintInfo&, const LayoutPoint&);
+
+ void paintBoxDecorationBackground(PaintInfo&, const LayoutPoint&);
+ void paintMask(PaintInfo&, const LayoutPoint&);
+ void paintClippingMask(PaintInfo&, const LayoutPoint&);
+ void paintFillLayers(const PaintInfo&, const Color&, const FillLayer&, const LayoutRect&, BackgroundBleedAvoidance = BackgroundBleedNone, CompositeOperator = CompositeSourceOver, RenderObject* backgroundObject = 0);
+ void paintMaskImages(const PaintInfo&, const LayoutRect&);
+ void paintBoxDecorationBackgroundWithRect(PaintInfo&, const LayoutPoint&, const LayoutRect&);
+
+private:
+ void paintBackground(const PaintInfo&, const LayoutRect&, const Color& backgroundColor, BackgroundBleedAvoidance = BackgroundBleedNone);
+ void paintRootBoxFillLayers(const PaintInfo&);
+ void paintFillLayer(const PaintInfo&, const Color&, const FillLayer&, const LayoutRect&, BackgroundBleedAvoidance, CompositeOperator, RenderObject* backgroundObject, bool skipBaseColor = false);
+
+ // FIXME: this should be const.
+ RenderBox& m_renderBox;
+};
+
+} // namespace blink
+
+#endif
« no previous file with comments | « Source/core/paint/BoxDecorationData.cpp ('k') | Source/core/paint/BoxPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698