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

Unified Diff: third_party/WebKit/Source/core/paint/FramePainter.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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/paint/FramePainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/FramePainter.cpp b/third_party/WebKit/Source/core/paint/FramePainter.cpp
index 849cd782313d5b5f4258b311d12ee00d93a00f96..8a8f36d20d2b22605207a367ef2750b85a2c3e55 100644
--- a/third_party/WebKit/Source/core/paint/FramePainter.cpp
+++ b/third_party/WebKit/Source/core/paint/FramePainter.cpp
@@ -95,6 +95,9 @@ void FramePainter::paintContents(GraphicsContext& context, const GlobalPaintFlag
{
Document* document = frameView().frame().document();
+ if (frameView().shouldThrottleRendering())
+ return;
+
#ifndef NDEBUG
bool fillWithRed;
if (document->printing())
@@ -120,10 +123,8 @@ void FramePainter::paintContents(GraphicsContext& context, const GlobalPaintFlag
return;
}
- if (!frameView().shouldThrottleRendering()) {
- RELEASE_ASSERT(!frameView().needsLayout());
- ASSERT(document->lifecycle().state() >= DocumentLifecycle::CompositingClean);
- }
+ RELEASE_ASSERT(!frameView().needsLayout());
+ ASSERT(document->lifecycle().state() >= DocumentLifecycle::CompositingClean);
TRACE_EVENT1("devtools.timeline", "Paint", "data", InspectorPaintEvent::data(layoutView, LayoutRect(rect), 0));
@@ -141,8 +142,7 @@ void FramePainter::paintContents(GraphicsContext& context, const GlobalPaintFlag
PaintLayer* rootLayer = layoutView->layer();
#if ENABLE(ASSERT)
- if (!frameView().shouldThrottleRendering())
- layoutView->assertSubtreeIsLaidOut();
+ layoutView->assertSubtreeIsLaidOut();
LayoutObject::SetLayoutNeededForbiddenScope forbidSetNeedsLayout(*rootLayer->layoutObject());
#endif

Powered by Google App Engine
This is Rietveld 408576698