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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 | 218 |
219 void updateScrollingBlockSelection(); | 219 void updateScrollingBlockSelection(); |
220 | 220 |
221 void adjustForCompositedScrolling(const GraphicsLayer*, IntSize& offset) con
st; | 221 void adjustForCompositedScrolling(const GraphicsLayer*, IntSize& offset) con
st; |
222 | 222 |
223 // Returns true for layers with scrollable overflow which have a background | 223 // Returns true for layers with scrollable overflow which have a background |
224 // that can be painted into the composited scrolling contents layer (i.e. | 224 // that can be painted into the composited scrolling contents layer (i.e. |
225 // the background can scroll with the content). When the background is also | 225 // the background can scroll with the content). When the background is also |
226 // opaque this allows us to composite the scroller even on low DPI as we can | 226 // opaque this allows us to composite the scroller even on low DPI as we can |
227 // draw with subpixel anti-aliasing. | 227 // draw with subpixel anti-aliasing. |
228 bool shouldPaintBackgroundOntoScrollingContentsLayer() const; | |
229 bool backgroundPaintsOntoScrollingContentsLayer() { return m_backgroundPaint
sOntoScrollingContentsLayer; } | 228 bool backgroundPaintsOntoScrollingContentsLayer() { return m_backgroundPaint
sOntoScrollingContentsLayer; } |
230 | 229 |
231 private: | 230 private: |
232 IntRect recomputeInterestRect(const GraphicsLayer*) const; | 231 IntRect recomputeInterestRect(const GraphicsLayer*) const; |
233 static bool interestRectChangedEnoughToRepaint(const IntRect& previousIntere
stRect, const IntRect& newInterestRect, const IntSize& layerSize); | 232 static bool interestRectChangedEnoughToRepaint(const IntRect& previousIntere
stRect, const IntRect& newInterestRect, const IntSize& layerSize); |
234 | 233 |
235 static const GraphicsLayerPaintInfo* containingSquashedLayer(const LayoutObj
ect*, const Vector<GraphicsLayerPaintInfo>& layers, unsigned maxSquashedLayerIn
dex); | 234 static const GraphicsLayerPaintInfo* containingSquashedLayer(const LayoutObj
ect*, const Vector<GraphicsLayerPaintInfo>& layers, unsigned maxSquashedLayerIn
dex); |
236 | 235 |
237 // Paints the scrollbar part associated with the given graphics layer into t
he given context. | 236 // Paints the scrollbar part associated with the given graphics layer into t
he given context. |
238 void paintScrollableArea(const GraphicsLayer*, GraphicsContext&, const IntRe
ct& interestRect) const; | 237 void paintScrollableArea(const GraphicsLayer*, GraphicsContext&, const IntRe
ct& interestRect) const; |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 | 466 |
468 // Keep track of whether the background is painted onto the scrolling conten
ts layer for invalidations. | 467 // Keep track of whether the background is painted onto the scrolling conten
ts layer for invalidations. |
469 unsigned m_backgroundPaintsOntoScrollingContentsLayer : 1; | 468 unsigned m_backgroundPaintsOntoScrollingContentsLayer : 1; |
470 | 469 |
471 friend class CompositedLayerMappingTest; | 470 friend class CompositedLayerMappingTest; |
472 }; | 471 }; |
473 | 472 |
474 } // namespace blink | 473 } // namespace blink |
475 | 474 |
476 #endif // CompositedLayerMapping_h | 475 #endif // CompositedLayerMapping_h |
OLD | NEW |