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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintLayerClipper.h

Issue 2793993003: Make GeometryMapper fully static (Closed)
Patch Set: Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003, 2009, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2009, 2012 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Intel Corporation. All rights reserved. 3 * Copyright (C) 2013 Intel Corporation. All rights reserved.
4 * 4 *
5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
6 * 6 *
7 * Other contributors: 7 * Other contributors:
8 * Robert O'Callahan <roc+@cs.cmu.edu> 8 * Robert O'Callahan <roc+@cs.cmu.edu>
9 * David Baron <dbaron@fas.harvard.edu> 9 * David Baron <dbaron@fas.harvard.edu>
10 * Christian Biesinger <cbiesinger@web.de> 10 * Christian Biesinger <cbiesinger@web.de>
(...skipping 30 matching lines...) Expand all
41 * If you do not delete the provisions above, a recipient may use your 41 * If you do not delete the provisions above, a recipient may use your
42 * version of this file under any of the LGPL, the MPL or the GPL. 42 * version of this file under any of the LGPL, the MPL or the GPL.
43 */ 43 */
44 44
45 #ifndef PaintLayerClipper_h 45 #ifndef PaintLayerClipper_h
46 #define PaintLayerClipper_h 46 #define PaintLayerClipper_h
47 47
48 #include "core/CoreExport.h" 48 #include "core/CoreExport.h"
49 #include "core/paint/ClipRectsCache.h" 49 #include "core/paint/ClipRectsCache.h"
50 50
51 #include "platform/graphics/paint/GeometryMapper.h"
52 #include "platform/scroll/ScrollTypes.h" 51 #include "platform/scroll/ScrollTypes.h"
53 52
54 #include "wtf/Allocator.h" 53 #include "wtf/Allocator.h"
55 54
56 namespace blink { 55 namespace blink {
57 56
58 class PaintLayer; 57 class PaintLayer;
58 class PropertyTreeState;
59 59
60 enum ShouldRespectOverflowClipType { IgnoreOverflowClip, RespectOverflowClip }; 60 enum ShouldRespectOverflowClipType { IgnoreOverflowClip, RespectOverflowClip };
61 61
62 class ClipRectsContext { 62 class ClipRectsContext {
63 STACK_ALLOCATED(); 63 STACK_ALLOCATED();
64 64
65 public: 65 public:
66 ClipRectsContext(const PaintLayer* root, 66 ClipRectsContext(const PaintLayer* root,
67 ClipRectsCacheSlot slot, 67 ClipRectsCacheSlot slot,
68 OverlayScrollbarClipBehavior overlayScrollbarClipBehavior = 68 OverlayScrollbarClipBehavior overlayScrollbarClipBehavior =
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 // Now instead if we add "clip: rect(0px, 100px, 100px, 0px)" to #container, 165 // Now instead if we add "clip: rect(0px, 100px, 100px, 0px)" to #container,
166 // the clip will apply to both #inflow and #fixed. That's because 'clip' 166 // the clip will apply to both #inflow and #fixed. That's because 'clip'
167 // applies to any descendant, regardless of containing blocks. Note that 167 // applies to any descendant, regardless of containing blocks. Note that
168 // #container and #fixed are siblings in the paint tree but #container does 168 // #container and #fixed are siblings in the paint tree but #container does
169 // clip #fixed. This is the reason why we compute the painting clip rects during 169 // clip #fixed. This is the reason why we compute the painting clip rects during
170 // a layout tree walk and cache them for painting. 170 // a layout tree walk and cache them for painting.
171 class CORE_EXPORT PaintLayerClipper { 171 class CORE_EXPORT PaintLayerClipper {
172 DISALLOW_NEW(); 172 DISALLOW_NEW();
173 173
174 public: 174 public:
175 explicit PaintLayerClipper(const PaintLayer&, GeometryMapper*); 175 explicit PaintLayerClipper(const PaintLayer&, bool useGeometryMapper);
176 176
177 void clearClipRectsIncludingDescendants(); 177 void clearClipRectsIncludingDescendants();
178 void clearClipRectsIncludingDescendants(ClipRectsCacheSlot); 178 void clearClipRectsIncludingDescendants(ClipRectsCacheSlot);
179 179
180 // Returns the background clip rect of the layer in the local coordinate 180 // Returns the background clip rect of the layer in the local coordinate
181 // space. Only looks for clips up to the given ancestor. 181 // space. Only looks for clips up to the given ancestor.
182 LayoutRect localClipRect(const PaintLayer& ancestorLayer) const; 182 LayoutRect localClipRect(const PaintLayer& ancestorLayer) const;
183 183
184 // Computes the same thing as backgroundRect in calculateRects(), but skips 184 // Computes the same thing as backgroundRect in calculateRects(), but skips
185 // applying CSS clip and the visualOverflowRect() of |m_layer|. 185 // applying CSS clip and the visualOverflowRect() of |m_layer|.
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 LayoutRect& layerBounds, 235 LayoutRect& layerBounds,
236 ClipRect& backgroundRect, 236 ClipRect& backgroundRect,
237 ClipRect& foregroundRect, 237 ClipRect& foregroundRect,
238 const LayoutPoint* offsetFromRoot = 0) const; 238 const LayoutPoint* offsetFromRoot = 0) const;
239 239
240 // Returns the visual rect of m_layer in local space. This includes 240 // Returns the visual rect of m_layer in local space. This includes
241 // filter effects. 241 // filter effects.
242 ALWAYS_INLINE LayoutRect localVisualRect() const; 242 ALWAYS_INLINE LayoutRect localVisualRect() const;
243 243
244 const PaintLayer& m_layer; 244 const PaintLayer& m_layer;
245 GeometryMapper* m_geometryMapper; 245 bool m_useGeometryMapper;
246 246
247 friend class PaintLayerClipperTest; 247 friend class PaintLayerClipperTest;
248 }; 248 };
249 249
250 } // namespace blink 250 } // namespace blink
251 251
252 #endif // LayerClipper_h 252 #endif // LayerClipper_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698