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 2416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2427 | 2427 |
2428 bool CompositedLayerMapping::needsRepaint(const GraphicsLayer& graphicsLayer) co
nst | 2428 bool CompositedLayerMapping::needsRepaint(const GraphicsLayer& graphicsLayer) co
nst |
2429 { | 2429 { |
2430 return isScrollableAreaLayer(&graphicsLayer) ? true : m_owningLayer.needsRep
aint(); | 2430 return isScrollableAreaLayer(&graphicsLayer) ? true : m_owningLayer.needsRep
aint(); |
2431 } | 2431 } |
2432 | 2432 |
2433 void CompositedLayerMapping::adjustForCompositedScrolling(const GraphicsLayer* g
raphicsLayer, IntSize& offset) const | 2433 void CompositedLayerMapping::adjustForCompositedScrolling(const GraphicsLayer* g
raphicsLayer, IntSize& offset) const |
2434 { | 2434 { |
2435 if (graphicsLayer == m_scrollingContentsLayer.get() || graphicsLayer == m_fo
regroundLayer.get()) { | 2435 if (graphicsLayer == m_scrollingContentsLayer.get() || graphicsLayer == m_fo
regroundLayer.get()) { |
2436 if (PaintLayerScrollableArea* scrollableArea = m_owningLayer.getScrollab
leArea()) { | 2436 if (PaintLayerScrollableArea* scrollableArea = m_owningLayer.getScrollab
leArea()) { |
2437 // Note: this is just the scroll offset, *not* the "adjusted scroll
offset". Scroll offset | 2437 if (scrollableArea->usesCompositedScrolling()) { |
2438 // does not include the origin adjustment. That is instead baked alr
eady into offsetFromLayoutObject. | 2438 // Note: this is just the scroll offset, *not* the "adjusted scr
oll offset". Scroll offset |
2439 DoubleSize scrollOffset = scrollableArea->scrollOffset(); | 2439 // does not include the origin adjustment. That is instead baked
already into offsetFromLayoutObject. |
2440 offset.expand(-scrollOffset.width(), -scrollOffset.height()); | 2440 DoubleSize scrollOffset = scrollableArea->scrollOffset(); |
| 2441 offset.expand(-scrollOffset.width(), -scrollOffset.height()); |
| 2442 } |
2441 } | 2443 } |
2442 } | 2444 } |
2443 } | 2445 } |
2444 | 2446 |
2445 void CompositedLayerMapping::paintContents(const GraphicsLayer* graphicsLayer, G
raphicsContext& context, | 2447 void CompositedLayerMapping::paintContents(const GraphicsLayer* graphicsLayer, G
raphicsContext& context, |
2446 GraphicsLayerPaintingPhase graphicsLayerPaintingPhase, const IntRect& intere
stRect) const | 2448 GraphicsLayerPaintingPhase graphicsLayerPaintingPhase, const IntRect& intere
stRect) const |
2447 { | 2449 { |
2448 // https://code.google.com/p/chromium/issues/detail?id=343772 | 2450 // https://code.google.com/p/chromium/issues/detail?id=343772 |
2449 DisableCompositingQueryAsserts disabler; | 2451 DisableCompositingQueryAsserts disabler; |
2450 // Allow throttling to make sure no painting paths (e.g., | 2452 // Allow throttling to make sure no painting paths (e.g., |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2706 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { | 2708 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { |
2707 name = "Scrolling Contents Layer"; | 2709 name = "Scrolling Contents Layer"; |
2708 } else { | 2710 } else { |
2709 ASSERT_NOT_REACHED(); | 2711 ASSERT_NOT_REACHED(); |
2710 } | 2712 } |
2711 | 2713 |
2712 return name; | 2714 return name; |
2713 } | 2715 } |
2714 | 2716 |
2715 } // namespace blink | 2717 } // namespace blink |
OLD | NEW |