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

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

Issue 1164573003: Move NinePieceImage painting to a separate class (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address review comments Created 5 years, 7 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/BoxPainter.cpp ('k') | Source/core/paint/NinePieceImagePainter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/NinePieceImagePainter.h
diff --git a/Source/core/paint/NinePieceImagePainter.h b/Source/core/paint/NinePieceImagePainter.h
new file mode 100644
index 0000000000000000000000000000000000000000..5606794b843618a9c8bec6015fd24d4323274990
--- /dev/null
+++ b/Source/core/paint/NinePieceImagePainter.h
@@ -0,0 +1,36 @@
+// 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 NinePieceImagePainter_h
+#define NinePieceImagePainter_h
+
+#include "platform/LayoutUnit.h"
+#include "platform/heap/Heap.h"
+#include "third_party/skia/include/core/SkXfermode.h"
+
+namespace blink {
+
+class ComputedStyle;
+class GraphicsContext;
+class LayoutBoxModelObject;
+class LayoutRect;
+class NinePieceImage;
+class BorderImageLength;
+
+class NinePieceImagePainter {
+ STACK_ALLOCATED();
+public:
+ NinePieceImagePainter(LayoutBoxModelObject&);
+
+ bool paint(GraphicsContext*, const LayoutRect&, const ComputedStyle&, const NinePieceImage&, SkXfermode::Mode) const;
+
+private:
+ static LayoutUnit computeBorderImageSide(const BorderImageLength& borderSlice, LayoutUnit borderSide, LayoutUnit imageSide, LayoutUnit boxExtent);
+
+ LayoutBoxModelObject& m_layoutObject;
+};
+
+} // namespace blink
+
+#endif // NinePieceImagePainter_h
« no previous file with comments | « Source/core/paint/BoxPainter.cpp ('k') | Source/core/paint/NinePieceImagePainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698