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

Side by Side Diff: Source/core/layout/svg/LayoutSVGPath.h

Issue 1158583003: Reduce how often LayoutSVGShape::updateShapeFromElement is called (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Put selfHasRelativeLengths back Created 5 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/layout/svg/LayoutSVGEllipse.cpp ('k') | Source/core/layout/svg/LayoutSVGPath.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org>
4 * Copyright (C) 2005 Eric Seidel <eric@webkit.org> 4 * Copyright (C) 2005 Eric Seidel <eric@webkit.org>
5 * Copyright (C) 2006 Apple Computer, Inc 5 * Copyright (C) 2006 Apple Computer, Inc
6 * Copyright (C) 2009 Google, Inc. 6 * Copyright (C) 2009 Google, Inc.
7 * Copyright (C) 2011 Renata Hodovan <reni@webkit.org> 7 * Copyright (C) 2011 Renata Hodovan <reni@webkit.org>
8 * Copyright (C) 2011 University of Szeged 8 * Copyright (C) 2011 University of Szeged
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 25 matching lines...) Expand all
36 virtual ~LayoutSVGPath(); 36 virtual ~LayoutSVGPath();
37 37
38 virtual const Vector<MarkerPosition>* markerPositions() const override { ret urn &m_markerPositions; } 38 virtual const Vector<MarkerPosition>* markerPositions() const override { ret urn &m_markerPositions; }
39 39
40 virtual const Vector<FloatPoint>* zeroLengthLineCaps() const override { retu rn &m_zeroLengthLinecapLocations; } 40 virtual const Vector<FloatPoint>* zeroLengthLineCaps() const override { retu rn &m_zeroLengthLinecapLocations; }
41 static FloatRect zeroLengthSubpathRect(const FloatPoint&, float); 41 static FloatRect zeroLengthSubpathRect(const FloatPoint&, float);
42 42
43 virtual const char* name() const override { return "LayoutSVGPath"; } 43 virtual const char* name() const override { return "LayoutSVGPath"; }
44 44
45 private: 45 private:
46 virtual void updateShapeFromElement() override; 46 void updateShapeFromElement() override;
47 void updateStrokeAndFillBoundingBoxes() override;
48
47 virtual FloatRect hitTestStrokeBoundingBox() const override; 49 virtual FloatRect hitTestStrokeBoundingBox() const override;
48 FloatRect calculateUpdatedStrokeBoundingBox() const;
49 50
50 virtual bool shapeDependentStrokeContains(const FloatPoint&) override; 51 virtual bool shapeDependentStrokeContains(const FloatPoint&) override;
51 52
52 FloatRect markerRect(float strokeWidth) const; 53 FloatRect markerRect(float strokeWidth) const;
53 bool shouldGenerateMarkerPositions() const; 54 bool shouldGenerateMarkerPositions() const;
54 void processMarkerPositions(); 55 void processMarkerPositions();
55 56
56 bool shouldStrokeZeroLengthSubpath() const; 57 bool shouldStrokeZeroLengthSubpath() const;
57 void updateZeroLengthSubpaths(); 58 void updateZeroLengthSubpaths();
58 59
59 Vector<MarkerPosition> m_markerPositions; 60 Vector<MarkerPosition> m_markerPositions;
60 Vector<FloatPoint> m_zeroLengthLinecapLocations; 61 Vector<FloatPoint> m_zeroLengthLinecapLocations;
61 }; 62 };
62 63
63 } 64 }
64 65
65 #endif 66 #endif
OLDNEW
« no previous file with comments | « Source/core/layout/svg/LayoutSVGEllipse.cpp ('k') | Source/core/layout/svg/LayoutSVGPath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698