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

Side by Side Diff: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp

Issue 1954093003: Don't try to paint graphics layers inside throttled frames (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add tests. Created 4 years, 7 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 | third_party/WebKit/Source/core/paint/FramePainter.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 2126 matching lines...) Expand 10 before | Expand all | Expand 10 after
2137 2137
2138 if (!(paintLayerFlags & PaintLayerPaintingOverflowContents)) { 2138 if (!(paintLayerFlags & PaintLayerPaintingOverflowContents)) {
2139 LayoutRect bounds = paintInfo.compositedBounds; 2139 LayoutRect bounds = paintInfo.compositedBounds;
2140 bounds.move(paintInfo.paintLayer->subpixelAccumulation()); 2140 bounds.move(paintInfo.paintLayer->subpixelAccumulation());
2141 dirtyRect.intersect(pixelSnappedIntRect(bounds)); 2141 dirtyRect.intersect(pixelSnappedIntRect(bounds));
2142 } else { 2142 } else {
2143 dirtyRect.move(roundedIntSize(paintInfo.paintLayer->subpixelAccumulation ())); 2143 dirtyRect.move(roundedIntSize(paintInfo.paintLayer->subpixelAccumulation ()));
2144 } 2144 }
2145 2145
2146 #if ENABLE(ASSERT) 2146 #if ENABLE(ASSERT)
2147 paintInfo.paintLayer->layoutObject()->assertSubtreeIsLaidOut(); 2147 if (!layoutObject()->view()->frame() || !layoutObject()->view()->frame()->sh ouldThrottleRendering())
2148 paintInfo.paintLayer->layoutObject()->assertSubtreeIsLaidOut();
2148 #endif 2149 #endif
2149 2150
2150 float deviceScaleFactor = blink::deviceScaleFactor(paintInfo.paintLayer->lay outObject()->frame()); 2151 float deviceScaleFactor = blink::deviceScaleFactor(paintInfo.paintLayer->lay outObject()->frame());
2151 context.setDeviceScaleFactor(deviceScaleFactor); 2152 context.setDeviceScaleFactor(deviceScaleFactor);
2152 2153
2153 if (paintInfo.paintLayer->compositingState() != PaintsIntoGroupedBacking) { 2154 if (paintInfo.paintLayer->compositingState() != PaintsIntoGroupedBacking) {
2154 // FIXME: GraphicsLayers need a way to split for multicol. 2155 // FIXME: GraphicsLayers need a way to split for multicol.
2155 PaintLayerPaintingInfo paintingInfo(paintInfo.paintLayer, LayoutRect(dir tyRect), GlobalPaintNormalPhase, paintInfo.paintLayer->subpixelAccumulation()); 2156 PaintLayerPaintingInfo paintingInfo(paintInfo.paintLayer, LayoutRect(dir tyRect), GlobalPaintNormalPhase, paintInfo.paintLayer->subpixelAccumulation());
2156 PaintLayerPainter(*paintInfo.paintLayer).paintLayerContents(context, pai ntingInfo, paintLayerFlags); 2157 PaintLayerPainter(*paintInfo.paintLayer).paintLayerContents(context, pai ntingInfo, paintLayerFlags);
2157 2158
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
2572 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { 2573 } else if (graphicsLayer == m_scrollingContentsLayer.get()) {
2573 name = "Scrolling Contents Layer"; 2574 name = "Scrolling Contents Layer";
2574 } else { 2575 } else {
2575 ASSERT_NOT_REACHED(); 2576 ASSERT_NOT_REACHED();
2576 } 2577 }
2577 2578
2578 return name; 2579 return name;
2579 } 2580 }
2580 2581
2581 } // namespace blink 2582 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/FramePainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698