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

Unified Diff: Source/core/layout/svg/LayoutSVGResourceClipper.h

Issue 1174393003: Unify content transformation calculations for SVG clip paths (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/layout/svg/LayoutSVGResourceClipper.h
diff --git a/Source/core/layout/svg/LayoutSVGResourceClipper.h b/Source/core/layout/svg/LayoutSVGResourceClipper.h
index 492484c4e4d7d25bdd2aa6e123df3533953e6571..99b0235448c8d6baad13f4db69f5376c71b66086 100644
--- a/Source/core/layout/svg/LayoutSVGResourceClipper.h
+++ b/Source/core/layout/svg/LayoutSVGResourceClipper.h
@@ -37,6 +37,8 @@ public:
virtual void removeAllClientsFromCache(bool markForInvalidation = true) override;
virtual void removeClientFromCache(LayoutObject*, bool markForInvalidation = true) override;
+ AffineTransform calculateContentTransformation(const LayoutObject*, const FloatRect& targetBoundingBox);
+
FloatRect resourceBoundingBox(const LayoutObject*);
static const LayoutSVGResourceType s_resourceType = ClipperResourceType;
@@ -46,14 +48,14 @@ public:
SVGUnitTypes::SVGUnitType clipPathUnits() const { return toSVGClipPathElement(element())->clipPathUnits()->currentValue()->enumValue(); }
- bool tryPathOnlyClipping(const LayoutObject&, GraphicsContext*, const AffineTransform&, const FloatRect&);
- PassRefPtr<const SkPicture> createContentPicture(AffineTransform&, const FloatRect&, GraphicsContext*);
+ bool tryPathOnlyClipping(const LayoutObject&, GraphicsContext*, const AffineTransform& contentTransformation);
+ PassRefPtr<const SkPicture> createContentPicture(const AffineTransform& contentTransformation, GraphicsContext*);
bool hasCycle() { return m_inClipExpansion; }
void beginClipExpansion() { ASSERT(!m_inClipExpansion); m_inClipExpansion = true; }
void endClipExpansion() { ASSERT(m_inClipExpansion); m_inClipExpansion = false; }
private:
- void calculateClipContentPaintInvalidationRect();
+ void calculateClipContentPaintInvalidationRect(const LayoutObject*);
RefPtr<const SkPicture> m_clipContentPicture;
FloatRect m_clipBoundaries;

Powered by Google App Engine
This is Rietveld 408576698