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 2110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2121 } else { | 2121 } else { |
2122 DeprecatedPaintLayerPaintingInfo paintingInfo(paintInfo.paintLayer, Layo
utRect(dirtyRect), PaintBehaviorNormal, paintInfo.paintLayer->subpixelAccumulati
on()); | 2122 DeprecatedPaintLayerPaintingInfo paintingInfo(paintInfo.paintLayer, Layo
utRect(dirtyRect), PaintBehaviorNormal, paintInfo.paintLayer->subpixelAccumulati
on()); |
2123 | 2123 |
2124 // DeprecatedPaintLayer::paintLayer assumes that the caller clips to the
passed rect. Squashed layers need to do this clipping in software, | 2124 // DeprecatedPaintLayer::paintLayer assumes that the caller clips to the
passed rect. Squashed layers need to do this clipping in software, |
2125 // since there is no graphics layer to clip them precisely. Furthermore,
in some cases we squash layers that need clipping in software | 2125 // since there is no graphics layer to clip them precisely. Furthermore,
in some cases we squash layers that need clipping in software |
2126 // from clipping ancestors (see CompositedDeprecatedPaintLayerMapping::l
ocalClipRectForSquashedLayer()). | 2126 // from clipping ancestors (see CompositedDeprecatedPaintLayerMapping::l
ocalClipRectForSquashedLayer()). |
2127 // FIXME: Is it correct to clip to dirtyRect in slimming paint mode? | 2127 // FIXME: Is it correct to clip to dirtyRect in slimming paint mode? |
2128 // FIXME: Combine similar code here and LayerClipRecorder. | 2128 // FIXME: Combine similar code here and LayerClipRecorder. |
2129 dirtyRect.intersect(paintInfo.localClipRectForSquashedLayer); | 2129 dirtyRect.intersect(paintInfo.localClipRectForSquashedLayer); |
2130 { | 2130 { |
2131 OwnPtr<DisplayItem> clipDisplayItem = ClipDisplayItem::create(*this,
DisplayItem::ClipLayerOverflowControls, dirtyRect); | 2131 ClipDisplayItem clipDisplayItem(*this, DisplayItem::ClipLayerOverflo
wControls, dirtyRect); |
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.release()); | 2135 context->displayItemList()->add(clipDisplayItem); |
2136 } else { | 2136 } else { |
2137 clipDisplayItem->replay(*context); | 2137 clipDisplayItem.replay(*context); |
2138 } | 2138 } |
2139 } | 2139 } |
2140 DeprecatedPaintLayerPainter(*paintInfo.paintLayer).paintLayer(context, p
aintingInfo, paintLayerFlags); | 2140 DeprecatedPaintLayerPainter(*paintInfo.paintLayer).paintLayer(context, p
aintingInfo, paintLayerFlags); |
2141 { | 2141 { |
2142 OwnPtr<DisplayItem> endClipDisplayItem = EndClipDisplayItem::create(
*this, DisplayItem::clipTypeToEndClipType(DisplayItem::ClipLayerOverflowControls
)); | 2142 EndClipDisplayItem endClipDisplayItem(*this, DisplayItem::clipTypeTo
EndClipType(DisplayItem::ClipLayerOverflowControls)); |
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 context->displayItemList()->add(endClipDisplayItem.release()
); | 2146 context->displayItemList()->add(endClipDisplayItem); |
2147 } else { | 2147 } else { |
2148 endClipDisplayItem->replay(*context); | 2148 endClipDisplayItem.replay(*context); |
2149 } | 2149 } |
2150 } | 2150 } |
2151 } | 2151 } |
2152 } | 2152 } |
2153 | 2153 |
2154 static void paintScrollbar(Scrollbar* scrollbar, GraphicsContext& context, const
IntRect& clip) | 2154 static void paintScrollbar(Scrollbar* scrollbar, GraphicsContext& context, const
IntRect& clip) |
2155 { | 2155 { |
2156 if (!scrollbar) | 2156 if (!scrollbar) |
2157 return; | 2157 return; |
2158 | 2158 |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2342 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { | 2342 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { |
2343 name = "Scrolling Block Selection Layer"; | 2343 name = "Scrolling Block Selection Layer"; |
2344 } else { | 2344 } else { |
2345 ASSERT_NOT_REACHED(); | 2345 ASSERT_NOT_REACHED(); |
2346 } | 2346 } |
2347 | 2347 |
2348 return name; | 2348 return name; |
2349 } | 2349 } |
2350 | 2350 |
2351 } // namespace blink | 2351 } // namespace blink |
OLD | NEW |