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

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

Issue 1284203004: Generate scroll/clip display item hierarchy for SPv2 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: stripped localPaintingInfo cleanup and fixed-pos workarounds Created 5 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
Index: Source/core/paint/LayerDescendantClipRecorder.h
diff --git a/Source/core/paint/LayerDescendantClipRecorder.h b/Source/core/paint/LayerDescendantClipRecorder.h
new file mode 100644
index 0000000000000000000000000000000000000000..57c0b79a171e18dff39f069e99dad4ad7b5230e6
--- /dev/null
+++ b/Source/core/paint/LayerDescendantClipRecorder.h
@@ -0,0 +1,35 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef LayerDescendantClipRecorder_h
+#define LayerDescendantClipRecorder_h
+
+#include "core/CoreExport.h"
+#include "wtf/FastAllocBase.h"
+
+namespace blink {
+
+class GraphicsContext;
+class LayoutBox;
+class LayoutPoint;
+
+// Note: This class is designed for SPv2, and has drastically different semantics than
+// LayerClipRecorder. In the old layer painting model, a layer is responsible for
+// calculating the accumulated clip from ancestors, and applies the clip to itself.
+// In SPv2, it is the layer that establishes overflow clipping who is responsible to clip
+// its descendants. This class takes a layer, and only issues clip for that layer.
+class CORE_EXPORT LayerDescendantClipRecorder {
+ WTF_MAKE_FAST_ALLOCATED(LayerDescendantClipRecorder);
+public:
+ LayerDescendantClipRecorder(GraphicsContext&, const LayoutBox&, const LayoutPoint& paintOffset);
+ ~LayerDescendantClipRecorder();
+
+private:
+ GraphicsContext& m_graphicsContext;
+ const LayoutBox& m_layoutBox;
+};
+
+} // namespace blink
+
+#endif // LayerDescendantClipRecorder_h

Powered by Google App Engine
This is Rietveld 408576698