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

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: Ready for review Created 5 years, 6 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 2110 matching lines...) Expand 10 before | Expand all | Expand 10 after
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);
2132 if (context->displayItemList()) { 2131 if (context->displayItemList()) {
2133 ASSERT(RuntimeEnabledFeatures::slimmingPaintEnabled()); 2132 ASSERT(RuntimeEnabledFeatures::slimmingPaintEnabled());
2134 if (!context->displayItemList()->displayItemConstructionIsDisabl ed()) 2133 if (!context->displayItemList()->displayItemConstructionIsDisabl ed())
2135 context->displayItemList()->add(clipDisplayItem.release()); 2134 context->displayItemList()->createAndAppendIfNeeded<ClipDisp layItem>(*this, DisplayItem::ClipLayerOverflowControls, dirtyRect);
2136 } else { 2135 } else {
2137 clipDisplayItem->replay(*context); 2136 ClipDisplayItem clipDisplayItem(*this, DisplayItem::ClipLayerOve rflowControls, dirtyRect);
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 ));
2143 if (context->displayItemList()) { 2142 if (context->displayItemList()) {
2144 ASSERT(RuntimeEnabledFeatures::slimmingPaintEnabled()); 2143 ASSERT(RuntimeEnabledFeatures::slimmingPaintEnabled());
2145 if (!context->displayItemList()->displayItemConstructionIsDisabl ed()) 2144 if (!context->displayItemList()->displayItemConstructionIsDisabl ed())
2146 context->displayItemList()->add(endClipDisplayItem.release() ); 2145 context->displayItemList()->createAndAppendIfNeeded<EndClipD isplayItem>(*this, DisplayItem::clipTypeToEndClipType(DisplayItem::ClipLayerOver flowControls));
2147 } else { 2146 } else {
2148 endClipDisplayItem->replay(*context); 2147 EndClipDisplayItem endClipDisplayItem(*this, DisplayItem::clipTy peToEndClipType(DisplayItem::ClipLayerOverflowControls));
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
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
OLDNEW
« no previous file with comments | « no previous file | Source/core/layout/svg/LayoutSVGResourceClipper.cpp » ('j') | Source/platform/graphics/paint/DisplayItem.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698