Chromium Code Reviews| 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 |