Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: Source/core/layout/compositing/CompositedDeprecatedPaintLayerMapping.cpp

Issue 1193433004: Blink-side contiguous allocation of display items. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Minor tweaks to make reviewing easier Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 2115 matching lines...) Expand 10 before | Expand all | Expand 10 after
2126 // DeprecatedPaintLayer::paintLayer assumes that the caller clips to the passed rect. Squashed layers need to do this clipping in software, 2126 // DeprecatedPaintLayer::paintLayer assumes that the caller clips to the passed rect. Squashed layers need to do this clipping in software,
2127 // since there is no graphics layer to clip them precisely. Furthermore, in some cases we squash layers that need clipping in software 2127 // since there is no graphics layer to clip them precisely. Furthermore, in some cases we squash layers that need clipping in software
2128 // from clipping ancestors (see CompositedDeprecatedPaintLayerMapping::l ocalClipRectForSquashedLayer()). 2128 // from clipping ancestors (see CompositedDeprecatedPaintLayerMapping::l ocalClipRectForSquashedLayer()).
2129 // FIXME: Is it correct to clip to dirtyRect in slimming paint mode? 2129 // FIXME: Is it correct to clip to dirtyRect in slimming paint mode?
2130 // FIXME: Combine similar code here and LayerClipRecorder. 2130 // FIXME: Combine similar code here and LayerClipRecorder.
2131 dirtyRect.intersect(paintInfo.localClipRectForSquashedLayer); 2131 dirtyRect.intersect(paintInfo.localClipRectForSquashedLayer);
2132 { 2132 {
2133 if (context->displayItemList()) { 2133 if (context->displayItemList()) {
2134 ASSERT(RuntimeEnabledFeatures::slimmingPaintEnabled()); 2134 ASSERT(RuntimeEnabledFeatures::slimmingPaintEnabled());
2135 if (!context->displayItemList()->displayItemConstructionIsDisabl ed()) 2135 if (!context->displayItemList()->displayItemConstructionIsDisabl ed())
2136 context->displayItemList()->add(ClipDisplayItem::create(*thi s, DisplayItem::ClipLayerOverflowControls, dirtyRect)); 2136 context->displayItemList()->createAndAppend<ClipDisplayItem> (*this, DisplayItem::ClipLayerOverflowControls, dirtyRect);
2137 } else { 2137 } else {
2138 OwnPtr<DisplayItem> clipDisplayItem = ClipDisplayItem::create(*t his, DisplayItem::ClipLayerOverflowControls, dirtyRect); 2138 ClipDisplayItem clipDisplayItem(*this, DisplayItem::ClipLayerOve rflowControls, dirtyRect);
2139 clipDisplayItem->replay(*context); 2139 clipDisplayItem.replay(*context);
2140 } 2140 }
2141 } 2141 }
2142 DeprecatedPaintLayerPainter(*paintInfo.paintLayer).paintLayer(context, p aintingInfo, paintLayerFlags); 2142 DeprecatedPaintLayerPainter(*paintInfo.paintLayer).paintLayer(context, p aintingInfo, paintLayerFlags);
2143 { 2143 {
2144 if (context->displayItemList()) { 2144 if (context->displayItemList()) {
2145 ASSERT(RuntimeEnabledFeatures::slimmingPaintEnabled()); 2145 ASSERT(RuntimeEnabledFeatures::slimmingPaintEnabled());
2146 if (!context->displayItemList()->displayItemConstructionIsDisabl ed()) { 2146 if (!context->displayItemList()->displayItemConstructionIsDisabl ed()) {
2147 if (context->displayItemList()->lastDisplayItemIsNoopBegin() ) 2147 if (context->displayItemList()->lastDisplayItemIsNoopBegin() )
2148 context->displayItemList()->removeLastDisplayItem(); 2148 context->displayItemList()->removeLastDisplayItem();
2149 else 2149 else
2150 context->displayItemList()->add(EndClipDisplayItem::crea te(*this, DisplayItem::clipTypeToEndClipType(DisplayItem::ClipLayerOverflowContr ols))); 2150 context->displayItemList()->createAndAppend<EndClipDispl ayItem>(*this, DisplayItem::clipTypeToEndClipType(DisplayItem::ClipLayerOverflow Controls));
2151 } 2151 }
2152 } else { 2152 } else {
2153 OwnPtr<DisplayItem> endClipDisplayItem = EndClipDisplayItem::cre ate(*this, DisplayItem::clipTypeToEndClipType(DisplayItem::ClipLayerOverflowCont rols)); 2153 EndClipDisplayItem endClipDisplayItem(*this, DisplayItem::clipTy peToEndClipType(DisplayItem::ClipLayerOverflowControls));
2154 endClipDisplayItem->replay(*context); 2154 endClipDisplayItem.replay(*context);
2155 } 2155 }
2156 } 2156 }
2157 } 2157 }
2158 } 2158 }
2159 2159
2160 static void paintScrollbar(Scrollbar* scrollbar, GraphicsContext& context, const IntRect& clip) 2160 static void paintScrollbar(Scrollbar* scrollbar, GraphicsContext& context, const IntRect& clip)
2161 { 2161 {
2162 if (!scrollbar) 2162 if (!scrollbar)
2163 return; 2163 return;
2164 2164
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
2348 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { 2348 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) {
2349 name = "Scrolling Block Selection Layer"; 2349 name = "Scrolling Block Selection Layer";
2350 } else { 2350 } else {
2351 ASSERT_NOT_REACHED(); 2351 ASSERT_NOT_REACHED();
2352 } 2352 }
2353 2353
2354 return name; 2354 return name;
2355 } 2355 }
2356 2356
2357 } // namespace blink 2357 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698