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

Unified Diff: Source/core/paint/ClipRecorder.h

Issue 757183003: Revert of Enable fast/images with slimming paint (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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 | « Source/core/paint/BoxPainter.cpp ('k') | Source/core/paint/ClipRecorder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/ClipRecorder.h
diff --git a/Source/core/paint/ClipRecorder.h b/Source/core/paint/ClipRecorder.h
index eccf137ffba1b8dcf3b583b55d65cf7ef867189e..9fea722569798fec58d068cae47a11c30744afbd 100644
--- a/Source/core/paint/ClipRecorder.h
+++ b/Source/core/paint/ClipRecorder.h
@@ -6,14 +6,16 @@
#define ClipRecorder_h
#include "core/paint/ViewDisplayList.h"
+#include "core/rendering/LayerPaintingInfo.h"
+#include "core/rendering/PaintPhase.h"
#include "core/rendering/RenderLayerModelObject.h"
-#include "platform/geometry/LayoutRect.h"
#include "platform/geometry/RoundedRect.h"
+#include "wtf/Vector.h"
namespace blink {
-class RenderLayerModelObject;
-struct PaintInfo;
+class ClipRect;
+class GraphicsContext;
class ClipDisplayItem : public DisplayItem {
public:
@@ -39,16 +41,33 @@
class ClipRecorder {
public:
- ClipRecorder(RenderLayerModelObject&, const PaintInfo&, const LayoutRect& clipRect);
+
+ enum BorderRadiusClippingRule { IncludeSelfForBorderRadius, DoNotIncludeSelfForBorderRadius };
+
+ // Set rounded clip rectangles defined by border radii all the way from the LayerPaintingInfo
+ // "root" layer down to the specified layer (or the parent of said layer, in case
+ // BorderRadiusClippingRule says to skip self). fragmentOffset is used for multicol, to specify
+ // the translation required to get from flow thread coordinates to visual coordinates for a
+ // certain column.
+ // FIXME: The BorderRadiusClippingRule parameter is really useless now. If we want to skip self,
+ // why not just supply the parent layer as the first parameter instead?
+ // FIXME: The ClipRect passed is in visual coordinates (not flow thread coordinates), but at the
+ // same time we pass a fragmentOffset, so that we can translate from flow thread coordinates to
+ // visual coordinates. This may look rather confusing/redundant, but it is needed for rounded
+ // border clipping. Would be nice to clean up this.
+ explicit ClipRecorder(const RenderLayerModelObject*, GraphicsContext*, DisplayItem::Type, const ClipRect&, const LayerPaintingInfo* localPaintingInfo, const LayoutPoint& fragmentOffset, PaintLayerFlags, BorderRadiusClippingRule = IncludeSelfForBorderRadius);
+
~ClipRecorder();
- static DisplayItem::Type paintPhaseToClipType(PaintPhase);
private:
- LayoutRect m_clipRect;
- const PaintInfo& m_paintInfo;
- RenderLayerModelObject& m_canvas;
+
+ void collectRoundedRectClips(RenderLayer&, const LayerPaintingInfo& localPaintingInfo, GraphicsContext*, const LayoutPoint& fragmentOffset, PaintLayerFlags,
+ BorderRadiusClippingRule, Vector<RoundedRect>& roundedRectClips);
+
+ GraphicsContext* m_graphicsContext;
+ const RenderLayerModelObject* m_renderer;
};
} // namespace blink
-#endif // ClipRecorder_h
+#endif // ViewDisplayList_h
« no previous file with comments | « Source/core/paint/BoxPainter.cpp ('k') | Source/core/paint/ClipRecorder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698