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

Side by Side Diff: third_party/WebKit/Source/core/paint/SVGImagePainter.h

Issue 1427943002: Wrap SVGImage for container during paint (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use IntSize for SVGImageForContainer Created 5 years, 1 month 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 unified diff | Download patch
OLDNEW
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698