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

Side by Side Diff: Source/core/rendering/RenderLayer.cpp

Issue 20723003: Fix pixel snapping issues when layers become composited (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Bring up to ToT again... Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/RenderLayer.h ('k') | Source/core/rendering/RenderLayerClipper.h » ('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) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
5 * 5 *
6 * Other contributors: 6 * Other contributors:
7 * Robert O'Callahan <roc+@cs.cmu.edu> 7 * Robert O'Callahan <roc+@cs.cmu.edu>
8 * David Baron <dbaron@fas.harvard.edu> 8 * David Baron <dbaron@fas.harvard.edu>
9 * Christian Biesinger <cbiesinger@web.de> 9 * Christian Biesinger <cbiesinger@web.de>
10 * Randall Jesup <rjesup@wgate.com> 10 * Randall Jesup <rjesup@wgate.com>
(...skipping 1998 matching lines...) Expand 10 before | Expand all | Expand 10 after
2009 2009
2010 if (paintFlags & PaintLayerPaintingRootBackgroundOnly && !renderer()->isRend erView() && !renderer()->isRoot()) 2010 if (paintFlags & PaintLayerPaintingRootBackgroundOnly && !renderer()->isRend erView() && !renderer()->isRoot())
2011 return; 2011 return;
2012 2012
2013 // Ensure our lists are up-to-date. 2013 // Ensure our lists are up-to-date.
2014 m_stackingNode->updateLayerListsIfNeeded(); 2014 m_stackingNode->updateLayerListsIfNeeded();
2015 2015
2016 LayoutPoint offsetFromRoot; 2016 LayoutPoint offsetFromRoot;
2017 convertToLayerCoords(paintingInfo.rootLayer, offsetFromRoot); 2017 convertToLayerCoords(paintingInfo.rootLayer, offsetFromRoot);
2018 2018
2019 IntRect rootRelativeBounds; 2019 if (compositingState() == PaintsIntoOwnBacking)
2020 offsetFromRoot.move(m_compositedLayerMapping->subpixelAccumulation());
2021
2022 LayoutRect rootRelativeBounds;
2020 bool rootRelativeBoundsComputed = false; 2023 bool rootRelativeBoundsComputed = false;
2021 2024
2022 // Apply clip-path to context. 2025 // Apply clip-path to context.
2023 bool hasClipPath = false; 2026 bool hasClipPath = false;
2024 RenderStyle* style = renderer()->style(); 2027 RenderStyle* style = renderer()->style();
2025 RenderSVGResourceClipper* resourceClipper = 0; 2028 RenderSVGResourceClipper* resourceClipper = 0;
2026 ClipperContext clipperContext; 2029 ClipperContext clipperContext;
2027 if (renderer()->hasClipPath() && !context->paintingDisabled() && style) { 2030 if (renderer()->hasClipPath() && !context->paintingDisabled() && style) {
2028 ASSERT(style->clipPath()); 2031 ASSERT(style->clipPath());
2029 if (style->clipPath()->type() == ClipPathOperation::SHAPE) { 2032 if (style->clipPath()->type() == ClipPathOperation::SHAPE) {
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
2131 paintBehavior |= PaintBehaviorSkipRootBackground; 2134 paintBehavior |= PaintBehaviorSkipRootBackground;
2132 else if (paintFlags & PaintLayerPaintingRootBackgroundOnly) 2135 else if (paintFlags & PaintLayerPaintingRootBackgroundOnly)
2133 paintBehavior |= PaintBehaviorRootBackgroundOnly; 2136 paintBehavior |= PaintBehaviorRootBackgroundOnly;
2134 2137
2135 LayerFragments layerFragments; 2138 LayerFragments layerFragments;
2136 if (shouldPaintContent || shouldPaintOutline || isPaintingOverlayScrollbars) { 2139 if (shouldPaintContent || shouldPaintOutline || isPaintingOverlayScrollbars) {
2137 // Collect the fragments. This will compute the clip rectangles and pain t offsets for each layer fragment, as well as whether or not the content of each 2140 // Collect the fragments. This will compute the clip rectangles and pain t offsets for each layer fragment, as well as whether or not the content of each
2138 // fragment should paint. 2141 // fragment should paint.
2139 collectFragments(layerFragments, localPaintingInfo.rootLayer, localPaint ingInfo.region, localPaintingInfo.paintDirtyRect, 2142 collectFragments(layerFragments, localPaintingInfo.rootLayer, localPaint ingInfo.region, localPaintingInfo.paintDirtyRect,
2140 (paintFlags & PaintLayerTemporaryClipRects) ? TemporaryClipRects : P aintingClipRects, IgnoreOverlayScrollbarSize, 2143 (paintFlags & PaintLayerTemporaryClipRects) ? TemporaryClipRects : P aintingClipRects, IgnoreOverlayScrollbarSize,
2141 (isPaintingOverflowContents) ? IgnoreOverflowClip : RespectOverflowC lip, &offsetFromRoot); 2144 (isPaintingOverflowContents) ? IgnoreOverflowClip : RespectOverflowC lip, &offsetFromRoot, localPaintingInfo.subPixelAccumulation);
2142 updatePaintingInfoForFragments(layerFragments, localPaintingInfo, paintF lags, shouldPaintContent, &offsetFromRoot); 2145 updatePaintingInfoForFragments(layerFragments, localPaintingInfo, paintF lags, shouldPaintContent, &offsetFromRoot);
2143 } 2146 }
2144 2147
2145 if (shouldPaintBackground) 2148 if (shouldPaintBackground)
2146 paintBackgroundForFragments(layerFragments, context, transparencyLayerCo ntext, paintingInfo.paintDirtyRect, haveTransparency, 2149 paintBackgroundForFragments(layerFragments, context, transparencyLayerCo ntext, paintingInfo.paintDirtyRect, haveTransparency,
2147 localPaintingInfo, paintBehavior, paintingRootForRenderer); 2150 localPaintingInfo, paintBehavior, paintingRootForRenderer);
2148 2151
2149 if (shouldPaintNegZOrderList) 2152 if (shouldPaintNegZOrderList)
2150 paintChildren(NegativeZOrderChildren, context, localPaintingInfo, paintF lags); 2153 paintChildren(NegativeZOrderChildren, context, localPaintingInfo, paintF lags);
2151 2154
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
2237 2240
2238 if (!childLayer->isPaginated()) 2241 if (!childLayer->isPaginated())
2239 childLayer->paintLayer(context, paintingInfo, paintFlags); 2242 childLayer->paintLayer(context, paintingInfo, paintFlags);
2240 else 2243 else
2241 paintPaginatedChildLayer(childLayer, context, paintingInfo, paintFla gs); 2244 paintPaginatedChildLayer(childLayer, context, paintingInfo, paintFla gs);
2242 } 2245 }
2243 } 2246 }
2244 2247
2245 void RenderLayer::collectFragments(LayerFragments& fragments, const RenderLayer* rootLayer, RenderRegion* region, const LayoutRect& dirtyRect, 2248 void RenderLayer::collectFragments(LayerFragments& fragments, const RenderLayer* rootLayer, RenderRegion* region, const LayoutRect& dirtyRect,
2246 ClipRectsType clipRectsType, OverlayScrollbarSizeRelevancy inOverlayScrollba rSizeRelevancy, ShouldRespectOverflowClip respectOverflowClip, const LayoutPoint * offsetFromRoot, 2249 ClipRectsType clipRectsType, OverlayScrollbarSizeRelevancy inOverlayScrollba rSizeRelevancy, ShouldRespectOverflowClip respectOverflowClip, const LayoutPoint * offsetFromRoot,
2247 const LayoutRect* layerBoundingBox) 2250 const LayoutSize& subPixelAccumulation, const LayoutRect* layerBoundingBox)
2248 { 2251 {
2249 if (!enclosingPaginationLayer() || hasTransform()) { 2252 if (!enclosingPaginationLayer() || hasTransform()) {
2250 // For unpaginated layers, there is only one fragment. 2253 // For unpaginated layers, there is only one fragment.
2251 LayerFragment fragment; 2254 LayerFragment fragment;
2252 ClipRectsContext clipRectsContext(rootLayer, region, clipRectsType, inOv erlayScrollbarSizeRelevancy, respectOverflowClip); 2255 ClipRectsContext clipRectsContext(rootLayer, region, clipRectsType, inOv erlayScrollbarSizeRelevancy, respectOverflowClip, subPixelAccumulation);
2253 clipper().calculateRects(clipRectsContext, dirtyRect, fragment.layerBoun ds, fragment.backgroundRect, fragment.foregroundRect, fragment.outlineRect, offs etFromRoot); 2256 clipper().calculateRects(clipRectsContext, dirtyRect, fragment.layerBoun ds, fragment.backgroundRect, fragment.foregroundRect, fragment.outlineRect, offs etFromRoot);
2254 fragments.append(fragment); 2257 fragments.append(fragment);
2255 return; 2258 return;
2256 } 2259 }
2257 2260
2258 // Compute our offset within the enclosing pagination layer. 2261 // Compute our offset within the enclosing pagination layer.
2259 LayoutPoint offsetWithinPaginatedLayer; 2262 LayoutPoint offsetWithinPaginatedLayer;
2260 convertToLayerCoords(enclosingPaginationLayer(), offsetWithinPaginatedLayer) ; 2263 convertToLayerCoords(enclosingPaginationLayer(), offsetWithinPaginatedLayer) ;
2261 2264
2262 // Calculate clip rects relative to the enclosingPaginationLayer. The purpos e of this call is to determine our bounds clipped to intermediate 2265 // Calculate clip rects relative to the enclosingPaginationLayer. The purpos e of this call is to determine our bounds clipped to intermediate
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
2328 } 2331 }
2329 } 2332 }
2330 2333
2331 void RenderLayer::paintTransformedLayerIntoFragments(GraphicsContext* context, c onst LayerPaintingInfo& paintingInfo, PaintLayerFlags paintFlags) 2334 void RenderLayer::paintTransformedLayerIntoFragments(GraphicsContext* context, c onst LayerPaintingInfo& paintingInfo, PaintLayerFlags paintFlags)
2332 { 2335 {
2333 LayerFragments enclosingPaginationFragments; 2336 LayerFragments enclosingPaginationFragments;
2334 LayoutPoint offsetOfPaginationLayerFromRoot; 2337 LayoutPoint offsetOfPaginationLayerFromRoot;
2335 LayoutRect transformedExtent = transparencyClipBox(this, enclosingPagination Layer(), PaintingTransparencyClipBox, RootOfTransparencyClipBox, paintingInfo.pa intBehavior); 2338 LayoutRect transformedExtent = transparencyClipBox(this, enclosingPagination Layer(), PaintingTransparencyClipBox, RootOfTransparencyClipBox, paintingInfo.pa intBehavior);
2336 enclosingPaginationLayer()->collectFragments(enclosingPaginationFragments, p aintingInfo.rootLayer, paintingInfo.region, paintingInfo.paintDirtyRect, 2339 enclosingPaginationLayer()->collectFragments(enclosingPaginationFragments, p aintingInfo.rootLayer, paintingInfo.region, paintingInfo.paintDirtyRect,
2337 (paintFlags & PaintLayerTemporaryClipRects) ? TemporaryClipRects : Paint ingClipRects, IgnoreOverlayScrollbarSize, 2340 (paintFlags & PaintLayerTemporaryClipRects) ? TemporaryClipRects : Paint ingClipRects, IgnoreOverlayScrollbarSize,
2338 (paintFlags & PaintLayerPaintingOverflowContents) ? IgnoreOverflowClip : RespectOverflowClip, &offsetOfPaginationLayerFromRoot, &transformedExtent); 2341 (paintFlags & PaintLayerPaintingOverflowContents) ? IgnoreOverflowClip : RespectOverflowClip, &offsetOfPaginationLayerFromRoot, paintingInfo.subPixelAcc umulation, &transformedExtent);
2339 2342
2340 for (size_t i = 0; i < enclosingPaginationFragments.size(); ++i) { 2343 for (size_t i = 0; i < enclosingPaginationFragments.size(); ++i) {
2341 const LayerFragment& fragment = enclosingPaginationFragments.at(i); 2344 const LayerFragment& fragment = enclosingPaginationFragments.at(i);
2342 2345
2343 // Apply the page/column clip for this fragment, as well as any clips es tablished by layers in between us and 2346 // Apply the page/column clip for this fragment, as well as any clips es tablished by layers in between us and
2344 // the enclosing pagination layer. 2347 // the enclosing pagination layer.
2345 LayoutRect clipRect = fragment.backgroundRect.rect(); 2348 LayoutRect clipRect = fragment.backgroundRect.rect();
2346 2349
2347 // Now compute the clips within a given fragment 2350 // Now compute the clips within a given fragment
2348 if (parent() != enclosingPaginationLayer()) { 2351 if (parent() != enclosingPaginationLayer()) {
2349 enclosingPaginationLayer()->convertToLayerCoords(paintingInfo.rootLa yer, offsetOfPaginationLayerFromRoot); 2352 enclosingPaginationLayer()->convertToLayerCoords(paintingInfo.rootLa yer, offsetOfPaginationLayerFromRoot);
2350 2353
2351 ClipRectsContext clipRectsContext(enclosingPaginationLayer(), painti ngInfo.region, (paintFlags & PaintLayerTemporaryClipRects) ? TemporaryClipRects : PaintingClipRects, 2354 ClipRectsContext clipRectsContext(enclosingPaginationLayer(), painti ngInfo.region, (paintFlags & PaintLayerTemporaryClipRects) ? TemporaryClipRects : PaintingClipRects,
2352 IgnoreOverlayScrollbarSize, (paintFlags & PaintLayerPaintingOver flowContents) ? IgnoreOverflowClip : RespectOverflowClip); 2355 IgnoreOverlayScrollbarSize, (paintFlags & PaintLayerPaintingOver flowContents) ? IgnoreOverflowClip : RespectOverflowClip);
2353 LayoutRect parentClipRect = backgroundClipRect(clipRectsContext).rec t(); 2356 LayoutRect parentClipRect = backgroundClipRect(clipRectsContext).rec t();
2354 parentClipRect.moveBy(fragment.paginationOffset + offsetOfPagination LayerFromRoot); 2357 parentClipRect.moveBy(fragment.paginationOffset + offsetOfPagination LayerFromRoot);
2355 clipRect.intersect(parentClipRect); 2358 clipRect.intersect(parentClipRect);
2356 } 2359 }
2357 2360
2358 parent()->clipToRect(paintingInfo.rootLayer, context, paintingInfo.paint DirtyRect, clipRect); 2361 parent()->clipToRect(paintingInfo.rootLayer, context, paintingInfo.paint DirtyRect, clipRect);
2359 paintLayerByApplyingTransform(context, paintingInfo, paintFlags, fragmen t.paginationOffset); 2362 paintLayerByApplyingTransform(context, paintingInfo, paintFlags, fragmen t.paginationOffset);
2360 parent()->restoreClip(context, paintingInfo.paintDirtyRect, clipRect); 2363 parent()->restoreClip(context, paintingInfo.paintDirtyRect, clipRect);
2361 } 2364 }
2362 } 2365 }
2363 2366
2367 static inline LayoutSize subPixelAccumulationIfNeeded(const LayoutSize& subPixel Accumulation, CompositingState compositingState)
2368 {
2369 // Only apply the sub-pixel accumulation if we don't paint into our own back ing layer, otherwise the position
2370 // of the renderer already includes any sub-pixel offset.
2371 if (compositingState == PaintsIntoOwnBacking)
2372 return LayoutSize();
2373 return subPixelAccumulation;
2374 }
2375
2364 void RenderLayer::paintBackgroundForFragments(const LayerFragments& layerFragmen ts, GraphicsContext* context, GraphicsContext* transparencyLayerContext, 2376 void RenderLayer::paintBackgroundForFragments(const LayerFragments& layerFragmen ts, GraphicsContext* context, GraphicsContext* transparencyLayerContext,
2365 const LayoutRect& transparencyPaintDirtyRect, bool haveTransparency, const L ayerPaintingInfo& localPaintingInfo, PaintBehavior paintBehavior, 2377 const LayoutRect& transparencyPaintDirtyRect, bool haveTransparency, const L ayerPaintingInfo& localPaintingInfo, PaintBehavior paintBehavior,
2366 RenderObject* paintingRootForRenderer) 2378 RenderObject* paintingRootForRenderer)
2367 { 2379 {
2368 for (size_t i = 0; i < layerFragments.size(); ++i) { 2380 for (size_t i = 0; i < layerFragments.size(); ++i) {
2369 const LayerFragment& fragment = layerFragments.at(i); 2381 const LayerFragment& fragment = layerFragments.at(i);
2370 if (!fragment.shouldPaintContent) 2382 if (!fragment.shouldPaintContent)
2371 continue; 2383 continue;
2372 2384
2373 // Begin transparency layers lazily now that we know we have to paint so mething. 2385 // Begin transparency layers lazily now that we know we have to paint so mething.
2374 if (haveTransparency || paintsWithBlendMode()) 2386 if (haveTransparency || paintsWithBlendMode())
2375 beginTransparencyLayers(transparencyLayerContext, localPaintingInfo. rootLayer, transparencyPaintDirtyRect, localPaintingInfo.paintBehavior); 2387 beginTransparencyLayers(transparencyLayerContext, localPaintingInfo. rootLayer, transparencyPaintDirtyRect, localPaintingInfo.paintBehavior);
2376 2388
2377 if (localPaintingInfo.clipToDirtyRect) { 2389 if (localPaintingInfo.clipToDirtyRect) {
2378 // Paint our background first, before painting any child layers. 2390 // Paint our background first, before painting any child layers.
2379 // Establish the clip used to paint our background. 2391 // Establish the clip used to paint our background.
2380 clipToRect(localPaintingInfo.rootLayer, context, localPaintingInfo.p aintDirtyRect, fragment.backgroundRect, DoNotIncludeSelfForBorderRadius); // Bac kground painting will handle clipping to self. 2392 clipToRect(localPaintingInfo.rootLayer, context, localPaintingInfo.p aintDirtyRect, fragment.backgroundRect, DoNotIncludeSelfForBorderRadius); // Bac kground painting will handle clipping to self.
2381 } 2393 }
2382 2394
2383 // Paint the background. 2395 // Paint the background.
2384 // FIXME: Eventually we will collect the region from the fragment itself instead of just from the paint info. 2396 // FIXME: Eventually we will collect the region from the fragment itself instead of just from the paint info.
2385 PaintInfo paintInfo(context, pixelSnappedIntRect(fragment.backgroundRect .rect()), PaintPhaseBlockBackground, paintBehavior, paintingRootForRenderer, loc alPaintingInfo.region, 0, 0, localPaintingInfo.rootLayer->renderer()); 2397 PaintInfo paintInfo(context, pixelSnappedIntRect(fragment.backgroundRect .rect()), PaintPhaseBlockBackground, paintBehavior, paintingRootForRenderer, loc alPaintingInfo.region, 0, 0, localPaintingInfo.rootLayer->renderer());
2386 renderer()->paint(paintInfo, toPoint(fragment.layerBounds.location() - r enderBoxLocation() + localPaintingInfo.subPixelAccumulation)); 2398 renderer()->paint(paintInfo, toPoint(fragment.layerBounds.location() - r enderBoxLocation() + subPixelAccumulationIfNeeded(localPaintingInfo.subPixelAccu mulation, compositingState())));
2387 2399
2388 if (localPaintingInfo.clipToDirtyRect) 2400 if (localPaintingInfo.clipToDirtyRect)
2389 restoreClip(context, localPaintingInfo.paintDirtyRect, fragment.back groundRect); 2401 restoreClip(context, localPaintingInfo.paintDirtyRect, fragment.back groundRect);
2390 } 2402 }
2391 } 2403 }
2392 2404
2393 void RenderLayer::paintForegroundForFragments(const LayerFragments& layerFragmen ts, GraphicsContext* context, GraphicsContext* transparencyLayerContext, 2405 void RenderLayer::paintForegroundForFragments(const LayerFragments& layerFragmen ts, GraphicsContext* context, GraphicsContext* transparencyLayerContext,
2394 const LayoutRect& transparencyPaintDirtyRect, bool haveTransparency, const L ayerPaintingInfo& localPaintingInfo, PaintBehavior paintBehavior, 2406 const LayoutRect& transparencyPaintDirtyRect, bool haveTransparency, const L ayerPaintingInfo& localPaintingInfo, PaintBehavior paintBehavior,
2395 RenderObject* paintingRootForRenderer, bool selectionOnly, bool forceBlackTe xt) 2407 RenderObject* paintingRootForRenderer, bool selectionOnly, bool forceBlackTe xt)
2396 { 2408 {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
2436 const LayerFragment& fragment = layerFragments.at(i); 2448 const LayerFragment& fragment = layerFragments.at(i);
2437 if (!fragment.shouldPaintContent || fragment.foregroundRect.isEmpty()) 2449 if (!fragment.shouldPaintContent || fragment.foregroundRect.isEmpty())
2438 continue; 2450 continue;
2439 2451
2440 if (shouldClip) 2452 if (shouldClip)
2441 clipToRect(localPaintingInfo.rootLayer, context, localPaintingInfo.p aintDirtyRect, fragment.foregroundRect); 2453 clipToRect(localPaintingInfo.rootLayer, context, localPaintingInfo.p aintDirtyRect, fragment.foregroundRect);
2442 2454
2443 PaintInfo paintInfo(context, pixelSnappedIntRect(fragment.foregroundRect .rect()), phase, paintBehavior, paintingRootForRenderer, localPaintingInfo.regio n, 0, 0, localPaintingInfo.rootLayer->renderer()); 2455 PaintInfo paintInfo(context, pixelSnappedIntRect(fragment.foregroundRect .rect()), phase, paintBehavior, paintingRootForRenderer, localPaintingInfo.regio n, 0, 0, localPaintingInfo.rootLayer->renderer());
2444 if (phase == PaintPhaseForeground) 2456 if (phase == PaintPhaseForeground)
2445 paintInfo.overlapTestRequests = localPaintingInfo.overlapTestRequest s; 2457 paintInfo.overlapTestRequests = localPaintingInfo.overlapTestRequest s;
2446 renderer()->paint(paintInfo, toPoint(fragment.layerBounds.location() - r enderBoxLocation() + localPaintingInfo.subPixelAccumulation)); 2458 renderer()->paint(paintInfo, toPoint(fragment.layerBounds.location() - r enderBoxLocation() + subPixelAccumulationIfNeeded(localPaintingInfo.subPixelAccu mulation, compositingState())));
2447 2459
2448 if (shouldClip) 2460 if (shouldClip)
2449 restoreClip(context, localPaintingInfo.paintDirtyRect, fragment.fore groundRect); 2461 restoreClip(context, localPaintingInfo.paintDirtyRect, fragment.fore groundRect);
2450 } 2462 }
2451 } 2463 }
2452 2464
2453 void RenderLayer::paintOutlineForFragments(const LayerFragments& layerFragments, GraphicsContext* context, const LayerPaintingInfo& localPaintingInfo, 2465 void RenderLayer::paintOutlineForFragments(const LayerFragments& layerFragments, GraphicsContext* context, const LayerPaintingInfo& localPaintingInfo,
2454 PaintBehavior paintBehavior, RenderObject* paintingRootForRenderer) 2466 PaintBehavior paintBehavior, RenderObject* paintingRootForRenderer)
2455 { 2467 {
2456 for (size_t i = 0; i < layerFragments.size(); ++i) { 2468 for (size_t i = 0; i < layerFragments.size(); ++i) {
2457 const LayerFragment& fragment = layerFragments.at(i); 2469 const LayerFragment& fragment = layerFragments.at(i);
2458 if (fragment.outlineRect.isEmpty()) 2470 if (fragment.outlineRect.isEmpty())
2459 continue; 2471 continue;
2460 2472
2461 // Paint our own outline 2473 // Paint our own outline
2462 PaintInfo paintInfo(context, pixelSnappedIntRect(fragment.outlineRect.re ct()), PaintPhaseSelfOutline, paintBehavior, paintingRootForRenderer, localPaint ingInfo.region, 0, 0, localPaintingInfo.rootLayer->renderer()); 2474 PaintInfo paintInfo(context, pixelSnappedIntRect(fragment.outlineRect.re ct()), PaintPhaseSelfOutline, paintBehavior, paintingRootForRenderer, localPaint ingInfo.region, 0, 0, localPaintingInfo.rootLayer->renderer());
2463 clipToRect(localPaintingInfo.rootLayer, context, localPaintingInfo.paint DirtyRect, fragment.outlineRect, DoNotIncludeSelfForBorderRadius); 2475 clipToRect(localPaintingInfo.rootLayer, context, localPaintingInfo.paint DirtyRect, fragment.outlineRect, DoNotIncludeSelfForBorderRadius);
2464 renderer()->paint(paintInfo, toPoint(fragment.layerBounds.location() - r enderBoxLocation() + localPaintingInfo.subPixelAccumulation)); 2476 renderer()->paint(paintInfo, toPoint(fragment.layerBounds.location() - r enderBoxLocation() + subPixelAccumulationIfNeeded(localPaintingInfo.subPixelAccu mulation, compositingState())));
2465 restoreClip(context, localPaintingInfo.paintDirtyRect, fragment.outlineR ect); 2477 restoreClip(context, localPaintingInfo.paintDirtyRect, fragment.outlineR ect);
2466 } 2478 }
2467 } 2479 }
2468 2480
2469 void RenderLayer::paintMaskForFragments(const LayerFragments& layerFragments, Gr aphicsContext* context, const LayerPaintingInfo& localPaintingInfo, 2481 void RenderLayer::paintMaskForFragments(const LayerFragments& layerFragments, Gr aphicsContext* context, const LayerPaintingInfo& localPaintingInfo,
2470 RenderObject* paintingRootForRenderer) 2482 RenderObject* paintingRootForRenderer)
2471 { 2483 {
2472 for (size_t i = 0; i < layerFragments.size(); ++i) { 2484 for (size_t i = 0; i < layerFragments.size(); ++i) {
2473 const LayerFragment& fragment = layerFragments.at(i); 2485 const LayerFragment& fragment = layerFragments.at(i);
2474 if (!fragment.shouldPaintContent) 2486 if (!fragment.shouldPaintContent)
2475 continue; 2487 continue;
2476 2488
2477 if (localPaintingInfo.clipToDirtyRect) 2489 if (localPaintingInfo.clipToDirtyRect)
2478 clipToRect(localPaintingInfo.rootLayer, context, localPaintingInfo.p aintDirtyRect, fragment.backgroundRect, DoNotIncludeSelfForBorderRadius); // Mas k painting will handle clipping to self. 2490 clipToRect(localPaintingInfo.rootLayer, context, localPaintingInfo.p aintDirtyRect, fragment.backgroundRect, DoNotIncludeSelfForBorderRadius); // Mas k painting will handle clipping to self.
2479 2491
2480 // Paint the mask. 2492 // Paint the mask.
2481 // FIXME: Eventually we will collect the region from the fragment itself instead of just from the paint info. 2493 // FIXME: Eventually we will collect the region from the fragment itself instead of just from the paint info.
2482 PaintInfo paintInfo(context, pixelSnappedIntRect(fragment.backgroundRect .rect()), PaintPhaseMask, PaintBehaviorNormal, paintingRootForRenderer, localPai ntingInfo.region, 0, 0, localPaintingInfo.rootLayer->renderer()); 2494 PaintInfo paintInfo(context, pixelSnappedIntRect(fragment.backgroundRect .rect()), PaintPhaseMask, PaintBehaviorNormal, paintingRootForRenderer, localPai ntingInfo.region, 0, 0, localPaintingInfo.rootLayer->renderer());
2483 renderer()->paint(paintInfo, toPoint(fragment.layerBounds.location() - r enderBoxLocation() + localPaintingInfo.subPixelAccumulation)); 2495 renderer()->paint(paintInfo, toPoint(fragment.layerBounds.location() - r enderBoxLocation() + subPixelAccumulationIfNeeded(localPaintingInfo.subPixelAccu mulation, compositingState())));
2484 2496
2485 if (localPaintingInfo.clipToDirtyRect) 2497 if (localPaintingInfo.clipToDirtyRect)
2486 restoreClip(context, localPaintingInfo.paintDirtyRect, fragment.back groundRect); 2498 restoreClip(context, localPaintingInfo.paintDirtyRect, fragment.back groundRect);
2487 } 2499 }
2488 } 2500 }
2489 2501
2490 void RenderLayer::paintChildClippingMaskForFragments(const LayerFragments& layer Fragments, GraphicsContext* context, const LayerPaintingInfo& localPaintingInfo, 2502 void RenderLayer::paintChildClippingMaskForFragments(const LayerFragments& layer Fragments, GraphicsContext* context, const LayerPaintingInfo& localPaintingInfo,
2491 RenderObject* paintingRootForRenderer) 2503 RenderObject* paintingRootForRenderer)
2492 { 2504 {
2493 for (size_t i = 0; i < layerFragments.size(); ++i) { 2505 for (size_t i = 0; i < layerFragments.size(); ++i) {
2494 const LayerFragment& fragment = layerFragments.at(i); 2506 const LayerFragment& fragment = layerFragments.at(i);
2495 if (!fragment.shouldPaintContent) 2507 if (!fragment.shouldPaintContent)
2496 continue; 2508 continue;
2497 2509
2498 if (localPaintingInfo.clipToDirtyRect) 2510 if (localPaintingInfo.clipToDirtyRect)
2499 clipToRect(localPaintingInfo.rootLayer, context, localPaintingInfo.p aintDirtyRect, fragment.foregroundRect, IncludeSelfForBorderRadius); // Child cl ipping mask painting will handle clipping to self. 2511 clipToRect(localPaintingInfo.rootLayer, context, localPaintingInfo.p aintDirtyRect, fragment.foregroundRect, IncludeSelfForBorderRadius); // Child cl ipping mask painting will handle clipping to self.
2500 2512
2501 // Paint the the clipped mask. 2513 // Paint the the clipped mask.
2502 PaintInfo paintInfo(context, pixelSnappedIntRect(fragment.backgroundRect .rect()), PaintPhaseClippingMask, PaintBehaviorNormal, paintingRootForRenderer, localPaintingInfo.region, 0, 0, localPaintingInfo.rootLayer->renderer()); 2514 PaintInfo paintInfo(context, pixelSnappedIntRect(fragment.backgroundRect .rect()), PaintPhaseClippingMask, PaintBehaviorNormal, paintingRootForRenderer, localPaintingInfo.region, 0, 0, localPaintingInfo.rootLayer->renderer());
2503 renderer()->paint(paintInfo, toPoint(fragment.layerBounds.location() - r enderBoxLocation() + localPaintingInfo.subPixelAccumulation)); 2515 renderer()->paint(paintInfo, toPoint(fragment.layerBounds.location() - r enderBoxLocation() + subPixelAccumulationIfNeeded(localPaintingInfo.subPixelAccu mulation, compositingState())));
2504 2516
2505 if (localPaintingInfo.clipToDirtyRect) 2517 if (localPaintingInfo.clipToDirtyRect)
2506 restoreClip(context, localPaintingInfo.paintDirtyRect, fragment.fore groundRect); 2518 restoreClip(context, localPaintingInfo.paintDirtyRect, fragment.fore groundRect);
2507 } 2519 }
2508 } 2520 }
2509 2521
2510 void RenderLayer::paintOverflowControlsForFragments(const LayerFragments& layerF ragments, GraphicsContext* context, const LayerPaintingInfo& localPaintingInfo) 2522 void RenderLayer::paintOverflowControlsForFragments(const LayerFragments& layerF ragments, GraphicsContext* context, const LayerPaintingInfo& localPaintingInfo)
2511 { 2523 {
2512 for (size_t i = 0; i < layerFragments.size(); ++i) { 2524 for (size_t i = 0; i < layerFragments.size(); ++i) {
2513 const LayerFragment& fragment = layerFragments.at(i); 2525 const LayerFragment& fragment = layerFragments.at(i);
2514 clipToRect(localPaintingInfo.rootLayer, context, localPaintingInfo.paint DirtyRect, fragment.backgroundRect); 2526 clipToRect(localPaintingInfo.rootLayer, context, localPaintingInfo.paint DirtyRect, fragment.backgroundRect);
2515 if (RenderLayerScrollableArea* scrollableArea = this->scrollableArea()) 2527 if (RenderLayerScrollableArea* scrollableArea = this->scrollableArea())
2516 scrollableArea->paintOverflowControls(context, roundedIntPoint(toPoi nt(fragment.layerBounds.location() - renderBoxLocation() + localPaintingInfo.sub PixelAccumulation)), pixelSnappedIntRect(fragment.backgroundRect.rect()), true); 2528 scrollableArea->paintOverflowControls(context, roundedIntPoint(toPoi nt(fragment.layerBounds.location() - renderBoxLocation() + subPixelAccumulationI fNeeded(localPaintingInfo.subPixelAccumulation, compositingState()))), pixelSnap pedIntRect(fragment.backgroundRect.rect()), true);
2517 restoreClip(context, localPaintingInfo.paintDirtyRect, fragment.backgrou ndRect); 2529 restoreClip(context, localPaintingInfo.paintDirtyRect, fragment.backgrou ndRect);
2518 } 2530 }
2519 } 2531 }
2520 2532
2521 void RenderLayer::paintPaginatedChildLayer(RenderLayer* childLayer, GraphicsCont ext* context, const LayerPaintingInfo& paintingInfo, PaintLayerFlags paintFlags) 2533 void RenderLayer::paintPaginatedChildLayer(RenderLayer* childLayer, GraphicsCont ext* context, const LayerPaintingInfo& paintingInfo, PaintLayerFlags paintFlags)
2522 { 2534 {
2523 // We need to do multiple passes, breaking up our child layer into strips. 2535 // We need to do multiple passes, breaking up our child layer into strips.
2524 Vector<RenderLayer*> columnLayers; 2536 Vector<RenderLayer*> columnLayers;
2525 RenderLayerStackingNode* ancestorNode = m_stackingNode->isNormalFlowOnly() ? parent()->stackingNode() : m_stackingNode->ancestorStackingContainerNode(); 2537 RenderLayerStackingNode* ancestorNode = m_stackingNode->isNormalFlowOnly() ? parent()->stackingNode() : m_stackingNode->ancestorStackingContainerNode();
2526 for (RenderLayer* curr = childLayer->parent(); curr; curr = curr->parent()) { 2538 for (RenderLayer* curr = childLayer->parent(); curr; curr = curr->parent()) {
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
2967 return false; 2979 return false;
2968 } 2980 }
2969 2981
2970 RenderLayer* RenderLayer::hitTestTransformedLayerInFragments(RenderLayer* rootLa yer, RenderLayer* containerLayer, const HitTestRequest& request, HitTestResult& result, 2982 RenderLayer* RenderLayer::hitTestTransformedLayerInFragments(RenderLayer* rootLa yer, RenderLayer* containerLayer, const HitTestRequest& request, HitTestResult& result,
2971 const LayoutRect& hitTestRect, const HitTestLocation& hitTestLocation, const HitTestingTransformState* transformState, double* zOffset) 2983 const LayoutRect& hitTestRect, const HitTestLocation& hitTestLocation, const HitTestingTransformState* transformState, double* zOffset)
2972 { 2984 {
2973 LayerFragments enclosingPaginationFragments; 2985 LayerFragments enclosingPaginationFragments;
2974 LayoutPoint offsetOfPaginationLayerFromRoot; 2986 LayoutPoint offsetOfPaginationLayerFromRoot;
2975 LayoutRect transformedExtent = transparencyClipBox(this, enclosingPagination Layer(), HitTestingTransparencyClipBox, RootOfTransparencyClipBox); 2987 LayoutRect transformedExtent = transparencyClipBox(this, enclosingPagination Layer(), HitTestingTransparencyClipBox, RootOfTransparencyClipBox);
2976 enclosingPaginationLayer()->collectFragments(enclosingPaginationFragments, r ootLayer, hitTestLocation.region(), hitTestRect, 2988 enclosingPaginationLayer()->collectFragments(enclosingPaginationFragments, r ootLayer, hitTestLocation.region(), hitTestRect,
2977 RootRelativeClipRects, IncludeOverlayScrollbarSize, RespectOverflowClip, &offsetOfPaginationLayerFromRoot, &transformedExtent); 2989 RootRelativeClipRects, IncludeOverlayScrollbarSize, RespectOverflowClip, &offsetOfPaginationLayerFromRoot, LayoutSize(), &transformedExtent);
2978 2990
2979 for (int i = enclosingPaginationFragments.size() - 1; i >= 0; --i) { 2991 for (int i = enclosingPaginationFragments.size() - 1; i >= 0; --i) {
2980 const LayerFragment& fragment = enclosingPaginationFragments.at(i); 2992 const LayerFragment& fragment = enclosingPaginationFragments.at(i);
2981 2993
2982 // Apply the page/column clip for this fragment, as well as any clips es tablished by layers in between us and 2994 // Apply the page/column clip for this fragment, as well as any clips es tablished by layers in between us and
2983 // the enclosing pagination layer. 2995 // the enclosing pagination layer.
2984 LayoutRect clipRect = fragment.backgroundRect.rect(); 2996 LayoutRect clipRect = fragment.backgroundRect.rect();
2985 2997
2986 // Now compute the clips within a given fragment 2998 // Now compute the clips within a given fragment
2987 if (parent() != enclosingPaginationLayer()) { 2999 if (parent() != enclosingPaginationLayer()) {
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
3414 3426
3415 result.moveBy(delta); 3427 result.moveBy(delta);
3416 return result; 3428 return result;
3417 } 3429 }
3418 3430
3419 IntRect RenderLayer::absoluteBoundingBox() const 3431 IntRect RenderLayer::absoluteBoundingBox() const
3420 { 3432 {
3421 return pixelSnappedIntRect(boundingBox(root())); 3433 return pixelSnappedIntRect(boundingBox(root()));
3422 } 3434 }
3423 3435
3424 IntRect RenderLayer::calculateLayerBounds(const RenderLayer* ancestorLayer, cons t LayoutPoint* offsetFromRoot, CalculateLayerBoundsFlags flags) const 3436 LayoutRect RenderLayer::calculateLayerBounds(const RenderLayer* ancestorLayer, c onst LayoutPoint* offsetFromRoot, CalculateLayerBoundsFlags flags) const
3425 { 3437 {
3426 if (!isSelfPaintingLayer()) 3438 if (!isSelfPaintingLayer())
3427 return IntRect(); 3439 return LayoutRect();
3428 3440
3429 // FIXME: This could be improved to do a check like hasVisibleNonCompositing DescendantLayers() (bug 92580). 3441 // FIXME: This could be improved to do a check like hasVisibleNonCompositing DescendantLayers() (bug 92580).
3430 if ((flags & ExcludeHiddenDescendants) && this != ancestorLayer && !hasVisib leContent() && !hasVisibleDescendant()) 3442 if ((flags & ExcludeHiddenDescendants) && this != ancestorLayer && !hasVisib leContent() && !hasVisibleDescendant())
3431 return IntRect(); 3443 return LayoutRect();
3432 3444
3433 RenderLayerModelObject* renderer = this->renderer(); 3445 RenderLayerModelObject* renderer = this->renderer();
3434 3446
3435 if (isRootLayer()) { 3447 if (isRootLayer()) {
3436 // The root layer is always just the size of the document. 3448 // The root layer is always just the size of the document.
3437 return renderer->view()->unscaledDocumentRect(); 3449 return renderer->view()->unscaledDocumentRect();
3438 } 3450 }
3439 3451
3440 LayoutRect boundingBoxRect = localBoundingBox(flags); 3452 LayoutRect boundingBoxRect = localBoundingBox(flags);
3441 3453
(...skipping 20 matching lines...) Expand all
3462 3474
3463 if (flags & UseLocalClipRectIfPossible) { 3475 if (flags & UseLocalClipRectIfPossible) {
3464 LayoutRect localClipRect = clipper().localClipRect(); 3476 LayoutRect localClipRect = clipper().localClipRect();
3465 if (localClipRect != PaintInfo::infiniteRect()) { 3477 if (localClipRect != PaintInfo::infiniteRect()) {
3466 if ((flags & IncludeSelfTransform) && shouldIncludeTransform) 3478 if ((flags & IncludeSelfTransform) && shouldIncludeTransform)
3467 localClipRect = transform()->mapRect(localClipRect); 3479 localClipRect = transform()->mapRect(localClipRect);
3468 3480
3469 LayoutPoint ancestorRelOffset; 3481 LayoutPoint ancestorRelOffset;
3470 convertToLayerCoords(ancestorLayer, ancestorRelOffset); 3482 convertToLayerCoords(ancestorLayer, ancestorRelOffset);
3471 localClipRect.moveBy(ancestorRelOffset); 3483 localClipRect.moveBy(ancestorRelOffset);
3472 return pixelSnappedIntRect(localClipRect); 3484 return localClipRect;
3473 } 3485 }
3474 } 3486 }
3475 3487
3476 // FIXME: should probably just pass 'flags' down to descendants. 3488 // FIXME: should probably just pass 'flags' down to descendants.
3477 CalculateLayerBoundsFlags descendantFlags = DefaultCalculateLayerBoundsFlags | (flags & ExcludeHiddenDescendants) | (flags & IncludeCompositedDescendants); 3489 CalculateLayerBoundsFlags descendantFlags = DefaultCalculateLayerBoundsFlags | (flags & ExcludeHiddenDescendants) | (flags & IncludeCompositedDescendants);
3478 3490
3479 const_cast<RenderLayer*>(this)->stackingNode()->updateLayerListsIfNeeded(); 3491 const_cast<RenderLayer*>(this)->stackingNode()->updateLayerListsIfNeeded();
3480 3492
3481 if (m_reflectionInfo) { 3493 if (m_reflectionInfo) {
3482 RenderLayer* reflectionLayer = m_reflectionInfo->reflectionLayer(); 3494 RenderLayer* reflectionLayer = m_reflectionInfo->reflectionLayer();
3483 if (!reflectionLayer->hasCompositedLayerMapping()) { 3495 if (!reflectionLayer->hasCompositedLayerMapping()) {
3484 IntRect childUnionBounds = reflectionLayer->calculateLayerBounds(thi s, 0, descendantFlags); 3496 LayoutRect childUnionBounds = reflectionLayer->calculateLayerBounds( this, 0, descendantFlags);
3485 unionBounds.unite(childUnionBounds); 3497 unionBounds.unite(childUnionBounds);
3486 } 3498 }
3487 } 3499 }
3488 3500
3489 ASSERT(m_stackingNode->isStackingContainer() || !m_stackingNode->hasPositive ZOrderList()); 3501 ASSERT(m_stackingNode->isStackingContainer() || !m_stackingNode->hasPositive ZOrderList());
3490 3502
3491 #if !ASSERT_DISABLED 3503 #if !ASSERT_DISABLED
3492 LayerListMutationDetector mutationChecker(const_cast<RenderLayer*>(this)->st ackingNode()); 3504 LayerListMutationDetector mutationChecker(const_cast<RenderLayer*>(this)->st ackingNode());
3493 #endif 3505 #endif
3494 3506
3495 // FIXME: Descendants that are composited should not necessarily be skipped, if they don't paint into their own 3507 // FIXME: Descendants that are composited should not necessarily be skipped, if they don't paint into their own
3496 // separate backing. Instead, they ought to contribute to the bounds of the layer we're trying to compute. 3508 // separate backing. Instead, they ought to contribute to the bounds of the layer we're trying to compute.
3497 // This applies to all z-order lists below. 3509 // This applies to all z-order lists below.
3498 RenderLayerStackingNodeIterator iterator(*m_stackingNode.get(), AllChildren) ; 3510 RenderLayerStackingNodeIterator iterator(*m_stackingNode.get(), AllChildren) ;
3499 while (RenderLayerStackingNode* node = iterator.next()) { 3511 while (RenderLayerStackingNode* node = iterator.next()) {
3500 // Node's compositing ancestor may have changed its draw content status 3512 // Node's compositing ancestor may have changed its draw content status
3501 // prior to updating its bounds. The requires-own-backing-store-for-ance stor-reasons 3513 // prior to updating its bounds. The requires-own-backing-store-for-ance stor-reasons
3502 // could be stale. Refresh them now. 3514 // could be stale. Refresh them now.
3503 if (node->layer()->hasCompositedLayerMapping()) { 3515 if (node->layer()->hasCompositedLayerMapping()) {
3504 RenderLayer* enclosingCompositingLayer = node->layer()->enclosingCom positingLayer(false); 3516 RenderLayer* enclosingCompositingLayer = node->layer()->enclosingCom positingLayer(false);
3505 node->layer()->compositedLayerMapping()->updateRequiresOwnBackingSto reForAncestorReasons(enclosingCompositingLayer); 3517 node->layer()->compositedLayerMapping()->updateRequiresOwnBackingSto reForAncestorReasons(enclosingCompositingLayer);
3506 } 3518 }
3507 3519
3508 if (flags & IncludeCompositedDescendants || !node->layer()->hasComposite dLayerMapping()) { 3520 if (flags & IncludeCompositedDescendants || !node->layer()->hasComposite dLayerMapping()) {
3509 IntRect childUnionBounds = node->layer()->calculateLayerBounds(this, 0, descendantFlags); 3521 LayoutRect childUnionBounds = node->layer()->calculateLayerBounds(th is, 0, descendantFlags);
3510 unionBounds.unite(childUnionBounds); 3522 unionBounds.unite(childUnionBounds);
3511 } 3523 }
3512 } 3524 }
3513 3525
3514 // FIXME: We can optimize the size of the composited layers, by not enlargin g 3526 // FIXME: We can optimize the size of the composited layers, by not enlargin g
3515 // filtered areas with the outsets if we know that the filter is going to re nder in hardware. 3527 // filtered areas with the outsets if we know that the filter is going to re nder in hardware.
3516 // https://bugs.webkit.org/show_bug.cgi?id=81239 3528 // https://bugs.webkit.org/show_bug.cgi?id=81239
3517 if (flags & IncludeLayerFilterOutsets) 3529 if (flags & IncludeLayerFilterOutsets)
3518 renderer->style()->filterOutsets().expandRect(unionBounds); 3530 renderer->style()->filterOutsets().expandRect(unionBounds);
3519 3531
3520 if ((flags & IncludeSelfTransform) && shouldIncludeTransform) { 3532 if ((flags & IncludeSelfTransform) && shouldIncludeTransform) {
3521 TransformationMatrix* affineTrans = transform(); 3533 TransformationMatrix* affineTrans = transform();
3522 boundingBoxRect = affineTrans->mapRect(boundingBoxRect); 3534 boundingBoxRect = affineTrans->mapRect(boundingBoxRect);
3523 unionBounds = affineTrans->mapRect(unionBounds); 3535 unionBounds = affineTrans->mapRect(unionBounds);
3524 } 3536 }
3525 3537
3526 LayoutPoint ancestorRelOffset; 3538 LayoutPoint ancestorRelOffset;
3527 if (offsetFromRoot) 3539 if (offsetFromRoot)
3528 ancestorRelOffset = *offsetFromRoot; 3540 ancestorRelOffset = *offsetFromRoot;
3529 else 3541 else
3530 convertToLayerCoords(ancestorLayer, ancestorRelOffset); 3542 convertToLayerCoords(ancestorLayer, ancestorRelOffset);
3531 unionBounds.moveBy(ancestorRelOffset); 3543 unionBounds.moveBy(ancestorRelOffset);
3532 3544
3533 return pixelSnappedIntRect(unionBounds); 3545 return unionBounds;
3534 } 3546 }
3535 3547
3536 CompositingState RenderLayer::compositingState() const 3548 CompositingState RenderLayer::compositingState() const
3537 { 3549 {
3538 // This is computed procedurally so there is no redundant state variable tha t 3550 // This is computed procedurally so there is no redundant state variable tha t
3539 // can get out of sync from the real actual compositing state. 3551 // can get out of sync from the real actual compositing state.
3540 3552
3541 if (m_groupedMapping) { 3553 if (m_groupedMapping) {
3542 ASSERT(compositor()->layerSquashingEnabled()); 3554 ASSERT(compositor()->layerSquashingEnabled());
3543 ASSERT(!m_compositedLayerMapping); 3555 ASSERT(!m_compositedLayerMapping);
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
4084 } 4096 }
4085 } 4097 }
4086 4098
4087 void showLayerTree(const WebCore::RenderObject* renderer) 4099 void showLayerTree(const WebCore::RenderObject* renderer)
4088 { 4100 {
4089 if (!renderer) 4101 if (!renderer)
4090 return; 4102 return;
4091 showLayerTree(renderer->enclosingLayer()); 4103 showLayerTree(renderer->enclosingLayer());
4092 } 4104 }
4093 #endif 4105 #endif
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderLayer.h ('k') | Source/core/rendering/RenderLayerClipper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698