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

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

Issue 2128463002: Pixel snap SVG's root border box to local transform [spv2] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 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 SVGRootPainter_h 5 #ifndef SVGRootPainter_h
6 #define SVGRootPainter_h 6 #define SVGRootPainter_h
7 7
8 #include "wtf/Allocator.h" 8 #include "wtf/Allocator.h"
9 9
10 namespace blink { 10 namespace blink {
11 11
12 struct PaintInfo; 12 struct PaintInfo;
13 class AffineTransform;
14 class IntRect;
13 class LayoutPoint; 15 class LayoutPoint;
14 class LayoutSVGRoot; 16 class LayoutSVGRoot;
15 17
16 class SVGRootPainter { 18 class SVGRootPainter {
17 STACK_ALLOCATED(); 19 STACK_ALLOCATED();
18 public: 20 public:
19 SVGRootPainter(const LayoutSVGRoot& layoutSVGRoot) : m_layoutSVGRoot(layoutS VGRoot) { } 21 SVGRootPainter(const LayoutSVGRoot& layoutSVGRoot) : m_layoutSVGRoot(layoutS VGRoot) { }
20 22
21 void paint(const PaintInfo&, const LayoutPoint&); 23 void paint(const PaintInfo&, const LayoutPoint&);
22 24
25 // Convert from container offsets (html/LayoutUnits) to our snapped local SV G transform space.
chrishtr 2016/07/06 17:50:58 pixelSnapped?
pdr. 2016/07/06 18:33:44 I wonder if we can start moving away from "pixel s
trchen 2016/07/06 19:00:21 Now I think of it, it is not really "snapped paint
pdr. 2016/07/06 20:23:27 I updated the name to be "transformToPixelSnappedB
26 AffineTransform snappedPaintOffsetToBorderBox(const LayoutPoint& paintOffset ) const;
27
23 private: 28 private:
29 IntRect pixelSnappedSize(const LayoutPoint& paintOffset) const;
30
24 const LayoutSVGRoot& m_layoutSVGRoot; 31 const LayoutSVGRoot& m_layoutSVGRoot;
25 }; 32 };
26 33
27 } // namespace blink 34 } // namespace blink
28 35
29 #endif // SVGRootPainter_h 36 #endif // SVGRootPainter_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/SVGPaintContext.h ('k') | third_party/WebKit/Source/core/paint/SVGRootPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698