| 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 2114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2125 // DeprecatedPaintLayer::paintLayer assumes that the caller clips to the
passed rect. Squashed layers need to do this clipping in software, | 2125 // DeprecatedPaintLayer::paintLayer assumes that the caller clips to the
passed rect. Squashed layers need to do this clipping in software, |
| 2126 // since there is no graphics layer to clip them precisely. Furthermore,
in some cases we squash layers that need clipping in software | 2126 // since there is no graphics layer to clip them precisely. Furthermore,
in some cases we squash layers that need clipping in software |
| 2127 // from clipping ancestors (see CompositedDeprecatedPaintLayerMapping::l
ocalClipRectForSquashedLayer()). | 2127 // from clipping ancestors (see CompositedDeprecatedPaintLayerMapping::l
ocalClipRectForSquashedLayer()). |
| 2128 // FIXME: Is it correct to clip to dirtyRect in slimming paint mode? | 2128 // FIXME: Is it correct to clip to dirtyRect in slimming paint mode? |
| 2129 // FIXME: Combine similar code here and LayerClipRecorder. | 2129 // FIXME: Combine similar code here and LayerClipRecorder. |
| 2130 dirtyRect.intersect(paintInfo.localClipRectForSquashedLayer); | 2130 dirtyRect.intersect(paintInfo.localClipRectForSquashedLayer); |
| 2131 { | 2131 { |
| 2132 if (context->displayItemList()) { | 2132 if (context->displayItemList()) { |
| 2133 ASSERT(RuntimeEnabledFeatures::slimmingPaintEnabled()); | 2133 ASSERT(RuntimeEnabledFeatures::slimmingPaintEnabled()); |
| 2134 if (!context->displayItemList()->displayItemConstructionIsDisabl
ed()) | 2134 if (!context->displayItemList()->displayItemConstructionIsDisabl
ed()) |
| 2135 context->displayItemList()->add(ClipDisplayItem::create(*thi
s, DisplayItem::ClipLayerOverflowControls, dirtyRect)); | 2135 context->displayItemList()->createAndAppend<ClipDisplayItem>
(*this, DisplayItem::ClipLayerOverflowControls, dirtyRect); |
| 2136 } else { | 2136 } else { |
| 2137 OwnPtr<DisplayItem> clipDisplayItem = ClipDisplayItem::create(*t
his, DisplayItem::ClipLayerOverflowControls, dirtyRect); | 2137 ClipDisplayItem clipDisplayItem(*this, DisplayItem::ClipLayerOve
rflowControls, dirtyRect); |
| 2138 clipDisplayItem->replay(*context); | 2138 clipDisplayItem.replay(*context); |
| 2139 } | 2139 } |
| 2140 } | 2140 } |
| 2141 DeprecatedPaintLayerPainter(*paintInfo.paintLayer).paintLayer(context, p
aintingInfo, paintLayerFlags); | 2141 DeprecatedPaintLayerPainter(*paintInfo.paintLayer).paintLayer(context, p
aintingInfo, paintLayerFlags); |
| 2142 { | 2142 { |
| 2143 if (context->displayItemList()) { | 2143 if (context->displayItemList()) { |
| 2144 ASSERT(RuntimeEnabledFeatures::slimmingPaintEnabled()); | 2144 ASSERT(RuntimeEnabledFeatures::slimmingPaintEnabled()); |
| 2145 if (!context->displayItemList()->displayItemConstructionIsDisabl
ed()) { | 2145 if (!context->displayItemList()->displayItemConstructionIsDisabl
ed()) { |
| 2146 if (context->displayItemList()->lastDisplayItemIsNoopBegin()
) | 2146 if (context->displayItemList()->lastDisplayItemIsNoopBegin()
) |
| 2147 context->displayItemList()->removeLastDisplayItem(); | 2147 context->displayItemList()->removeLastDisplayItem(); |
| 2148 else | 2148 else |
| 2149 context->displayItemList()->add(EndClipDisplayItem::crea
te(*this, DisplayItem::clipTypeToEndClipType(DisplayItem::ClipLayerOverflowContr
ols))); | 2149 context->displayItemList()->createAndAppend<EndClipDispl
ayItem>(*this, DisplayItem::clipTypeToEndClipType(DisplayItem::ClipLayerOverflow
Controls)); |
| 2150 } | 2150 } |
| 2151 } else { | 2151 } else { |
| 2152 OwnPtr<DisplayItem> endClipDisplayItem = EndClipDisplayItem::cre
ate(*this, DisplayItem::clipTypeToEndClipType(DisplayItem::ClipLayerOverflowCont
rols)); | 2152 EndClipDisplayItem endClipDisplayItem(*this, DisplayItem::clipTy
peToEndClipType(DisplayItem::ClipLayerOverflowControls)); |
| 2153 endClipDisplayItem->replay(*context); | 2153 endClipDisplayItem.replay(*context); |
| 2154 } | 2154 } |
| 2155 } | 2155 } |
| 2156 } | 2156 } |
| 2157 } | 2157 } |
| 2158 | 2158 |
| 2159 static void paintScrollbar(Scrollbar* scrollbar, GraphicsContext& context, const
IntRect& clip) | 2159 static void paintScrollbar(Scrollbar* scrollbar, GraphicsContext& context, const
IntRect& clip) |
| 2160 { | 2160 { |
| 2161 if (!scrollbar) | 2161 if (!scrollbar) |
| 2162 return; | 2162 return; |
| 2163 | 2163 |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2347 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { | 2347 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { |
| 2348 name = "Scrolling Block Selection Layer"; | 2348 name = "Scrolling Block Selection Layer"; |
| 2349 } else { | 2349 } else { |
| 2350 ASSERT_NOT_REACHED(); | 2350 ASSERT_NOT_REACHED(); |
| 2351 } | 2351 } |
| 2352 | 2352 |
| 2353 return name; | 2353 return name; |
| 2354 } | 2354 } |
| 2355 | 2355 |
| 2356 } // namespace blink | 2356 } // namespace blink |
| OLD | NEW |