| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef SVGImagePainter_h | 5 #ifndef SVGImagePainter_h |
| 6 #define SVGImagePainter_h | 6 #define SVGImagePainter_h |
| 7 | 7 |
| 8 #include "platform/geometry/FloatSize.h" |
| 8 #include "wtf/Allocator.h" | 9 #include "wtf/Allocator.h" |
| 9 | 10 |
| 10 namespace blink { | 11 namespace blink { |
| 11 | 12 |
| 12 struct PaintInfo; | 13 struct PaintInfo; |
| 13 class LayoutSVGImage; | 14 class LayoutSVGImage; |
| 14 | 15 |
| 15 class SVGImagePainter { | 16 class SVGImagePainter { |
| 16 STACK_ALLOCATED(); | 17 STACK_ALLOCATED(); |
| 17 public: | 18 public: |
| 18 SVGImagePainter(const LayoutSVGImage& layoutSVGImage) : m_layoutSVGImage(lay
outSVGImage) { } | 19 SVGImagePainter(const LayoutSVGImage& layoutSVGImage) : m_layoutSVGImage(lay
outSVGImage) { } |
| 19 | 20 |
| 20 void paint(const PaintInfo&); | 21 void paint(const PaintInfo&); |
| 21 | 22 |
| 22 private: | 23 private: |
| 23 // Assumes the PaintInfo context has had all local transforms applied. | 24 // Assumes the PaintInfo context has had all local transforms applied. |
| 24 void paintForeground(const PaintInfo&); | 25 void paintForeground(const PaintInfo&); |
| 26 FloatSize computeImageViewportSize() const; |
| 25 | 27 |
| 26 const LayoutSVGImage& m_layoutSVGImage; | 28 const LayoutSVGImage& m_layoutSVGImage; |
| 27 }; | 29 }; |
| 28 | 30 |
| 29 } // namespace blink | 31 } // namespace blink |
| 30 | 32 |
| 31 #endif // SVGImagePainter_h | 33 #endif // SVGImagePainter_h |
| OLD | NEW |