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

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: 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..eb193c73bf71f95b7786fb1a2e5449f006f09d45
--- /dev/null
+++ b/Source/core/paint/NinePieceImagePainter.h
@@ -0,0 +1,34 @@
+// 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 "third_party/skia/include/core/SkXfermode.h"
+
+namespace blink {
+
+class ComputedStyle;
+class GraphicsContext;
+class LayoutBoxModelObject;
+class LayoutRect;
+class NinePieceImage;
+class BorderImageLength;
+
+class NinePieceImagePainter {
pdr. 2015/06/02 01:41:51 Can you add STACK_ALLOCATED() here?
davve 2015/06/02 07:18:52 Done.
+public:
+ NinePieceImagePainter(LayoutBoxModelObject&);
+
+ bool paint(GraphicsContext*, const LayoutRect&, const ComputedStyle&, const NinePieceImage&, SkXfermode::Mode);
pdr. 2015/06/02 01:41:50 Can you make this const? Maybe best for a followu
davve 2015/06/02 07:18:52 Done.
+
+private:
+ static LayoutUnit computeBorderImageSide(const BorderImageLength& borderSlice, LayoutUnit borderSide, LayoutUnit imageSide, LayoutUnit boxExtent);
pdr. 2015/06/02 01:41:51 Nit, maybe for a followup: should these LayoutUnit
davve 2015/06/02 07:18:52 Will look into it in a follow-up.
+
+ 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