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

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

Issue 1203343002: WIP for display item list backed by ListContainer Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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
« no previous file with comments | « no previous file | Source/core/layout/svg/LayoutSVGResourceClipper.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2112 matching lines...) Expand 10 before | Expand all | Expand 10 after
2123 } else { 2123 } else {
2124 DeprecatedPaintLayerPaintingInfo paintingInfo(paintInfo.paintLayer, Layo utRect(dirtyRect), PaintBehaviorNormal, paintInfo.paintLayer->subpixelAccumulati on()); 2124 DeprecatedPaintLayerPaintingInfo paintingInfo(paintInfo.paintLayer, Layo utRect(dirtyRect), PaintBehaviorNormal, paintInfo.paintLayer->subpixelAccumulati on());
2125 2125
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()->displayItemConstructionIsDisa bled())
2136 context->displayItemList()->add(ClipDisplayItem::create(*thi s, DisplayItem::ClipLayerOverflowControls, dirtyRect)); 2136 // context->displayItemList()->add(ClipDisplayItem::create(*t his, DisplayItem::ClipLayerOverflowControls, dirtyRect));
2137 } else { 2137 //} else {
2138 OwnPtr<DisplayItem> clipDisplayItem = ClipDisplayItem::create(*t his, DisplayItem::ClipLayerOverflowControls, dirtyRect); 2138 // OwnPtr<DisplayItem> clipDisplayItem = ClipDisplayItem::create( *this, DisplayItem::ClipLayerOverflowControls, 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()->displayItemConstructionIsDisa bled()) {
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()->add(EndClipDisplayItem::cr eate(*this, DisplayItem::clipTypeToEndClipType(DisplayItem::ClipLayerOverflowCon trols)));
2151 } 2151 // }
2152 } else { 2152 //} else {
2153 OwnPtr<DisplayItem> endClipDisplayItem = EndClipDisplayItem::cre ate(*this, DisplayItem::clipTypeToEndClipType(DisplayItem::ClipLayerOverflowCont rols)); 2153 // OwnPtr<DisplayItem> endClipDisplayItem = EndClipDisplayItem::c reate(*this, DisplayItem::clipTypeToEndClipType(DisplayItem::ClipLayerOverflowCo ntrols));
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
2165 const IntRect& scrollbarRect = scrollbar->frameRect(); 2165 const IntRect& scrollbarRect = scrollbar->frameRect();
(...skipping 182 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
« no previous file with comments | « no previous file | Source/core/layout/svg/LayoutSVGResourceClipper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698