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

Unified Diff: Source/core/rendering/PaintInvalidationState.h

Issue 598623002: Initial PaintInvalidationState support for SVG (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Move code to clippedOverflow... Created 6 years, 3 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
« no previous file with comments | « no previous file | Source/core/rendering/PaintInvalidationState.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/PaintInvalidationState.h
diff --git a/Source/core/rendering/PaintInvalidationState.h b/Source/core/rendering/PaintInvalidationState.h
index dcca3932f86641d1850efd77b6424936e3a584f3..da3fde13bcaaa37b16a76ea9f4d7d08d6326857e 100644
--- a/Source/core/rendering/PaintInvalidationState.h
+++ b/Source/core/rendering/PaintInvalidationState.h
@@ -6,23 +6,27 @@
#define PaintInvalidationState_h
#include "platform/geometry/LayoutRect.h"
+#include "platform/transforms/AffineTransform.h"
#include "wtf/Noncopyable.h"
namespace blink {
class RenderLayerModelObject;
class RenderObject;
+class RenderSVGModelObject;
class RenderView;
class PaintInvalidationState {
WTF_MAKE_NONCOPYABLE(PaintInvalidationState);
public:
PaintInvalidationState(const PaintInvalidationState& next, RenderLayerModelObject& renderer, const RenderLayerModelObject& paintInvalidationContainer);
+ PaintInvalidationState(const PaintInvalidationState& next, const RenderSVGModelObject& renderer);
explicit PaintInvalidationState(const RenderView&);
const LayoutRect& clipRect() const { return m_clipRect; }
const LayoutSize& paintOffset() const { return m_paintOffset; }
+ const AffineTransform& svgTransform() const { ASSERT(m_svgTransform); return *m_svgTransform; }
bool cachedOffsetsEnabled() const { return m_cachedOffsetsEnabled; }
bool isClipped() const { return m_clipped; }
@@ -38,6 +42,7 @@ public:
}
private:
void applyClipIfNeeded(const RenderObject&);
+ void addClipRectRelativeToPaintOffset(const LayoutSize& clipSize);
friend class ForceHorriblySlowRectMapping;
@@ -51,6 +56,11 @@ private:
LayoutSize m_paintOffset;
const RenderLayerModelObject& m_paintInvalidationContainer;
+
+ // Transform from the initial viewport coordinate system of an outermost
+ // SVG root to the userspace _before_ the relevant element. Combining this
+ // with |m_paintOffset| yields the "final" offset.
+ OwnPtr<AffineTransform> m_svgTransform;
};
} // namespace blink
« no previous file with comments | « no previous file | Source/core/rendering/PaintInvalidationState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698