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

Side by Side Diff: Source/core/layout/svg/LayoutSVGEllipse.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 | « no previous file | Source/core/layout/svg/LayoutSVGEllipse.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) 2012 Google, Inc. 2 * Copyright (C) 2012 Google, Inc.
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 23 matching lines...) Expand all
34 class LayoutSVGEllipse final : public LayoutSVGShape { 34 class LayoutSVGEllipse final : public LayoutSVGShape {
35 public: 35 public:
36 explicit LayoutSVGEllipse(SVGGeometryElement*); 36 explicit LayoutSVGEllipse(SVGGeometryElement*);
37 virtual ~LayoutSVGEllipse(); 37 virtual ~LayoutSVGEllipse();
38 38
39 virtual ShapeGeometryCodePath geometryCodePath() const override { return m_u sePathFallback ? PathGeometry : EllipseGeometryFastPath; } 39 virtual ShapeGeometryCodePath geometryCodePath() const override { return m_u sePathFallback ? PathGeometry : EllipseGeometryFastPath; }
40 40
41 virtual const char* name() const override { return "LayoutSVGEllipse"; } 41 virtual const char* name() const override { return "LayoutSVGEllipse"; }
42 42
43 private: 43 private:
44 virtual void updateShapeFromElement() override; 44 void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) override ;
45 void updateShapeFromElement() override;
46 void updateStrokeAndFillBoundingBoxes() override;
45 virtual bool isShapeEmpty() const override { return m_usePathFallback ? Layo utSVGShape::isShapeEmpty() : m_fillBoundingBox.isEmpty(); } 47 virtual bool isShapeEmpty() const override { return m_usePathFallback ? Layo utSVGShape::isShapeEmpty() : m_fillBoundingBox.isEmpty(); }
46 virtual bool shapeDependentStrokeContains(const FloatPoint&) override; 48 virtual bool shapeDependentStrokeContains(const FloatPoint&) override;
47 virtual bool shapeDependentFillContains(const FloatPoint&, const WindRule) c onst override; 49 virtual bool shapeDependentFillContains(const FloatPoint&, const WindRule) c onst override;
48 void calculateRadiiAndCenter(); 50 void calculateRadiiAndCenter();
49 bool hasContinuousStroke() const; 51 bool hasContinuousStroke(const SVGComputedStyle&) const;
50 52
51 private: 53 private:
52 FloatPoint m_center; 54 FloatPoint m_center;
53 FloatSize m_radii; 55 FloatSize m_radii;
54 bool m_usePathFallback; 56 bool m_usePathFallback;
55 }; 57 };
56 58
57 } 59 }
58 60
59 #endif 61 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/core/layout/svg/LayoutSVGEllipse.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698