OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 return m_squashingLayerOffsetFromTransformedAncestor; | 210 return m_squashingLayerOffsetFromTransformedAncestor; |
211 } | 211 } |
212 | 212 |
213 // If there is a squashed layer painting into this CLM that is an ancestor o
f the given LayoutObject, return it. Otherwise return nullptr. | 213 // If there is a squashed layer painting into this CLM that is an ancestor o
f the given LayoutObject, return it. Otherwise return nullptr. |
214 const GraphicsLayerPaintInfo* containingSquashedLayer(const LayoutObject*, u
nsigned maxSquashedLayerIndex); | 214 const GraphicsLayerPaintInfo* containingSquashedLayer(const LayoutObject*, u
nsigned maxSquashedLayerIndex); |
215 | 215 |
216 void updateScrollingBlockSelection(); | 216 void updateScrollingBlockSelection(); |
217 | 217 |
218 void adjustForCompositedScrolling(const GraphicsLayer*, IntSize& offset) con
st; | 218 void adjustForCompositedScrolling(const GraphicsLayer*, IntSize& offset) con
st; |
219 | 219 |
220 // Returns true for layers with scrollable overflow which have a background | |
221 // that can be painted into the composited scrolling contents layer (i.e. | |
222 // the background can scroll with the content). When the background is also | |
223 // opaque this allows us to composite the scroller even on low DPI as we can | |
224 // draw with subpixel anti-aliasing. | |
225 bool shouldPaintBackgroundOntoScrollingContentsLayer() const; | |
226 | |
227 private: | 220 private: |
228 IntRect recomputeInterestRect(const GraphicsLayer*) const; | 221 IntRect recomputeInterestRect(const GraphicsLayer*) const; |
229 static bool interestRectChangedEnoughToRepaint(const IntRect& previousIntere
stRect, const IntRect& newInterestRect, const IntSize& layerSize); | 222 static bool interestRectChangedEnoughToRepaint(const IntRect& previousIntere
stRect, const IntRect& newInterestRect, const IntSize& layerSize); |
230 | 223 |
231 static const GraphicsLayerPaintInfo* containingSquashedLayer(const LayoutObj
ect*, const Vector<GraphicsLayerPaintInfo>& layers, unsigned maxSquashedLayerIn
dex); | 224 static const GraphicsLayerPaintInfo* containingSquashedLayer(const LayoutObj
ect*, const Vector<GraphicsLayerPaintInfo>& layers, unsigned maxSquashedLayerIn
dex); |
232 | 225 |
233 // Paints the scrollbar part associated with the given graphics layer into t
he given context. | 226 // Paints the scrollbar part associated with the given graphics layer into t
he given context. |
234 void paintScrollableArea(const GraphicsLayer*, GraphicsContext&, const IntRe
ct& interestRect) const; | 227 void paintScrollableArea(const GraphicsLayer*, GraphicsContext&, const IntRe
ct& interestRect) const; |
235 // Returns whether the given layer is part of the scrollable area, if any, a
ssociated with this mapping. | 228 // Returns whether the given layer is part of the scrollable area, if any, a
ssociated with this mapping. |
236 bool isScrollableAreaLayer(const GraphicsLayer*) const; | 229 bool isScrollableAreaLayer(const GraphicsLayer*) const; |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
460 | 453 |
461 unsigned m_backgroundLayerPaintsFixedRootBackground : 1; | 454 unsigned m_backgroundLayerPaintsFixedRootBackground : 1; |
462 unsigned m_scrollingContentsAreEmpty : 1; | 455 unsigned m_scrollingContentsAreEmpty : 1; |
463 | 456 |
464 friend class CompositedLayerMappingTest; | 457 friend class CompositedLayerMappingTest; |
465 }; | 458 }; |
466 | 459 |
467 } // namespace blink | 460 } // namespace blink |
468 | 461 |
469 #endif // CompositedLayerMapping_h | 462 #endif // CompositedLayerMapping_h |
OLD | NEW |