OLD | NEW |
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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 ClipRects& StoreClipRectsInCache(const ClipRectsContext&, | 216 ClipRects& StoreClipRectsInCache(const ClipRectsContext&, |
217 ClipRects* parent_clip_rects, | 217 ClipRects* parent_clip_rects, |
218 const ClipRects&) const; | 218 const ClipRects&) const; |
219 | 219 |
220 void GetOrCalculateClipRects(const ClipRectsContext&, ClipRects&) const; | 220 void GetOrCalculateClipRects(const ClipRectsContext&, ClipRects&) const; |
221 | 221 |
222 ALWAYS_INLINE bool ShouldClipOverflow(const ClipRectsContext&) const; | 222 ALWAYS_INLINE bool ShouldClipOverflow(const ClipRectsContext&) const; |
223 ALWAYS_INLINE bool ShouldRespectOverflowClip(const ClipRectsContext&) const; | 223 ALWAYS_INLINE bool ShouldRespectOverflowClip(const ClipRectsContext&) const; |
224 | 224 |
225 // Returned clip rect in |output| is in the space of the context's rootLayer. | 225 // Returned clip rect in |output| is in the space of the context's rootLayer. |
| 226 // if |should_clip_to_visual_overflow| is true, clips to the bounds of the |
| 227 // visual overflow of |layer_|. |
226 ALWAYS_INLINE void CalculateBackgroundClipRectWithGeometryMapper( | 228 ALWAYS_INLINE void CalculateBackgroundClipRectWithGeometryMapper( |
227 const ClipRectsContext&, | 229 const ClipRectsContext&, |
228 ClipRect& output) const; | 230 ClipRect& output, |
| 231 bool should_clip_to_visual_overflow) const; |
229 | 232 |
230 ALWAYS_INLINE void InitializeCommonClipRectState( | 233 ALWAYS_INLINE void InitializeCommonClipRectState( |
231 const ClipRectsContext&, | 234 const ClipRectsContext&, |
232 PropertyTreeState& descendant_property_tree_state, | 235 PropertyTreeState& descendant_property_tree_state, |
233 PropertyTreeState& ancestor_property_tree_state) const; | 236 PropertyTreeState& ancestor_property_tree_state) const; |
234 | 237 |
235 // Same as calculateRects, but using GeometryMapper. | 238 // Same as calculateRects, but using GeometryMapper. |
236 ALWAYS_INLINE void CalculateRectsWithGeometryMapper( | 239 ALWAYS_INLINE void CalculateRectsWithGeometryMapper( |
237 const ClipRectsContext&, | 240 const ClipRectsContext&, |
238 const LayoutRect& paint_dirty_rect, | 241 const LayoutRect& paint_dirty_rect, |
239 LayoutRect& layer_bounds, | 242 LayoutRect& layer_bounds, |
240 ClipRect& background_rect, | 243 ClipRect& background_rect, |
241 ClipRect& foreground_rect, | 244 ClipRect& foreground_rect, |
242 const LayoutPoint* offset_from_root = 0) const; | 245 const LayoutPoint* offset_from_root = 0) const; |
243 | 246 |
244 // Returns the visual rect of m_layer in local space. This includes | 247 // Returns the visual rect of m_layer in local space. This includes |
245 // filter effects. | 248 // filter effects. |
246 ALWAYS_INLINE LayoutRect LocalVisualRect() const; | 249 ALWAYS_INLINE LayoutRect LocalVisualRect() const; |
247 | 250 |
248 const PaintLayer& layer_; | 251 const PaintLayer& layer_; |
249 bool use_geometry_mapper_; | 252 bool use_geometry_mapper_; |
250 | 253 |
251 friend class PaintLayerClipperTest; | 254 friend class PaintLayerClipperTest; |
252 }; | 255 }; |
253 | 256 |
254 } // namespace blink | 257 } // namespace blink |
255 | 258 |
256 #endif // LayerClipper_h | 259 #endif // LayerClipper_h |
OLD | NEW |