Chromium Code Reviews| 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..379e2f17d29fb2b95ab04f2c85fd3a56c3de882c |
| --- /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_layoutObject; |
|
pdr.
2015/09/08 04:23:54
Nit: m_layoutBox;
trchen
2015/09/15 04:48:40
Done.
|
| +}; |
| + |
| +} // namespace blink |
| + |
| +#endif // LayerDescendantClipRecorder_h |