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

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

Issue 2033183002: [SPv2] Paint invalidation in PreWalkTreeWalk, plumbed on PaintInvalidationState (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@RootFrame
Patch Set: Created 4 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 1184 matching lines...) Expand 10 before | Expand all | Expand 10 after
1195 } 1195 }
1196 1196
1197 void LayoutObject::invalidatePaintUsingContainer(const LayoutBoxModelObject& pai ntInvalidationContainer, const LayoutRect& dirtyRect, PaintInvalidationReason in validationReason) const 1197 void LayoutObject::invalidatePaintUsingContainer(const LayoutBoxModelObject& pai ntInvalidationContainer, const LayoutRect& dirtyRect, PaintInvalidationReason in validationReason) const
1198 { 1198 {
1199 // TODO(wangxianzhu): Enable the following assert after paint invalidation f or spv2 is ready. 1199 // TODO(wangxianzhu): Enable the following assert after paint invalidation f or spv2 is ready.
1200 // ASSERT(!RuntimeEnabledFeatures::slimmingPaintV2Enabled()); 1200 // ASSERT(!RuntimeEnabledFeatures::slimmingPaintV2Enabled());
1201 1201
1202 if (paintInvalidationContainer.frameView()->shouldThrottleRendering()) 1202 if (paintInvalidationContainer.frameView()->shouldThrottleRendering())
1203 return; 1203 return;
1204 1204
1205 ASSERT(gDisablePaintInvalidationStateAsserts || document().lifecycle().state () == DocumentLifecycle::InPaintInvalidation); 1205 DCHECK(gDisablePaintInvalidationStateAsserts
1206 || document().lifecycle().state() == (RuntimeEnabledFeatures::slimmingPa intInvalidationEnabled() ? DocumentLifecycle::InPrePaint : DocumentLifecycle::In PaintInvalidation));
1206 1207
1207 if (dirtyRect.isEmpty()) 1208 if (dirtyRect.isEmpty())
1208 return; 1209 return;
1209 1210
1210 RELEASE_ASSERT(isRooted()); 1211 RELEASE_ASSERT(isRooted());
1211 1212
1212 // FIXME: Unify "devtools.timeline.invalidationTracking" and "blink.invalida tion". crbug.com/413527. 1213 // FIXME: Unify "devtools.timeline.invalidationTracking" and "blink.invalida tion". crbug.com/413527.
1213 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline.invalidati onTracking"), 1214 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline.invalidati onTracking"),
1214 "PaintInvalidationTracking", 1215 "PaintInvalidationTracking",
1215 TRACE_EVENT_SCOPE_THREAD, 1216 TRACE_EVENT_SCOPE_THREAD,
(...skipping 2471 matching lines...) Expand 10 before | Expand all | Expand 10 after
3687 const blink::LayoutObject* root = object1; 3688 const blink::LayoutObject* root = object1;
3688 while (root->parent()) 3689 while (root->parent())
3689 root = root->parent(); 3690 root = root->parent();
3690 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3691 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3691 } else { 3692 } else {
3692 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); 3693 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n");
3693 } 3694 }
3694 } 3695 }
3695 3696
3696 #endif 3697 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698