OLD | NEW |
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 1179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1190 | 1190 |
1191 if (HostWindow* window = frameView->hostWindow()) | 1191 if (HostWindow* window = frameView->hostWindow()) |
1192 window->invalidateRect(frameView->contentsToRootFrame(paintRect)); | 1192 window->invalidateRect(frameView->contentsToRootFrame(paintRect)); |
1193 } | 1193 } |
1194 | 1194 |
1195 void LayoutObject::invalidatePaintUsingContainer(const LayoutBoxModelObject& pai
ntInvalidationContainer, const LayoutRect& dirtyRect, PaintInvalidationReason in
validationReason) const | 1195 void LayoutObject::invalidatePaintUsingContainer(const LayoutBoxModelObject& pai
ntInvalidationContainer, const LayoutRect& dirtyRect, PaintInvalidationReason in
validationReason) const |
1196 { | 1196 { |
1197 if (RuntimeEnabledFeatures::slimmingPaintSynchronizedPaintingEnabled()) | 1197 if (RuntimeEnabledFeatures::slimmingPaintSynchronizedPaintingEnabled()) |
1198 return; | 1198 return; |
1199 | 1199 |
| 1200 if (paintInvalidationContainer.frameView()->shouldThrottleRendering()) |
| 1201 return; |
| 1202 |
1200 ASSERT(gDisablePaintInvalidationStateAsserts || document().lifecycle().state
() == DocumentLifecycle::InPaintInvalidation); | 1203 ASSERT(gDisablePaintInvalidationStateAsserts || document().lifecycle().state
() == DocumentLifecycle::InPaintInvalidation); |
1201 | 1204 |
1202 if (dirtyRect.isEmpty()) | 1205 if (dirtyRect.isEmpty()) |
1203 return; | 1206 return; |
1204 | 1207 |
1205 RELEASE_ASSERT(isRooted()); | 1208 RELEASE_ASSERT(isRooted()); |
1206 | 1209 |
1207 // FIXME: Unify "devtools.timeline.invalidationTracking" and "blink.invalida
tion". crbug.com/413527. | 1210 // FIXME: Unify "devtools.timeline.invalidationTracking" and "blink.invalida
tion". crbug.com/413527. |
1208 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline.invalidati
onTracking"), | 1211 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline.invalidati
onTracking"), |
1209 "PaintInvalidationTracking", | 1212 "PaintInvalidationTracking", |
(...skipping 2029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3239 bool isUpgradingDelayedFullToFull = m_bitfields.fullPaintInvalidationReason(
) == PaintInvalidationDelayedFull && reason != PaintInvalidationDelayedFull; | 3242 bool isUpgradingDelayedFullToFull = m_bitfields.fullPaintInvalidationReason(
) == PaintInvalidationDelayedFull && reason != PaintInvalidationDelayedFull; |
3240 | 3243 |
3241 if (m_bitfields.fullPaintInvalidationReason() == PaintInvalidationNone || is
UpgradingDelayedFullToFull) { | 3244 if (m_bitfields.fullPaintInvalidationReason() == PaintInvalidationNone || is
UpgradingDelayedFullToFull) { |
3242 if (reason == PaintInvalidationFull) | 3245 if (reason == PaintInvalidationFull) |
3243 reason = documentLifecycleBasedPaintInvalidationReason(document().li
fecycle()); | 3246 reason = documentLifecycleBasedPaintInvalidationReason(document().li
fecycle()); |
3244 m_bitfields.setFullPaintInvalidationReason(reason); | 3247 m_bitfields.setFullPaintInvalidationReason(reason); |
3245 } | 3248 } |
3246 | 3249 |
3247 if (!isUpgradingDelayedFullToFull) { | 3250 if (!isUpgradingDelayedFullToFull) { |
3248 ASSERT(document().lifecycle().state() != DocumentLifecycle::InPaintInval
idation); | 3251 ASSERT(document().lifecycle().state() != DocumentLifecycle::InPaintInval
idation); |
3249 frame()->page()->animator().scheduleVisualUpdate(); // In case that this
is called outside of FrameView::updateLayoutAndStyleForPainting(). | 3252 frame()->scheduleVisualUpdateUnlessThrottled(); // In case that this is
called outside of FrameView::updateLayoutAndStyleForPainting(). |
3250 markContainerChainForPaintInvalidation(); | 3253 markContainerChainForPaintInvalidation(); |
3251 } | 3254 } |
3252 } | 3255 } |
3253 | 3256 |
3254 void LayoutObject::setMayNeedPaintInvalidation() | 3257 void LayoutObject::setMayNeedPaintInvalidation() |
3255 { | 3258 { |
3256 if (mayNeedPaintInvalidation()) | 3259 if (mayNeedPaintInvalidation()) |
3257 return; | 3260 return; |
3258 m_bitfields.setMayNeedPaintInvalidation(true); | 3261 m_bitfields.setMayNeedPaintInvalidation(true); |
3259 markContainerChainForPaintInvalidation(); | 3262 markContainerChainForPaintInvalidation(); |
3260 frame()->page()->animator().scheduleVisualUpdate(); // In case that this is
called outside of FrameView::updateLayoutAndStyleForPainting(). | 3263 frame()->scheduleVisualUpdateUnlessThrottled(); // In case that this is call
ed outside of FrameView::updateLayoutAndStyleForPainting(). |
3261 } | 3264 } |
3262 | 3265 |
3263 void LayoutObject::clearPaintInvalidationState(const PaintInvalidationState& pai
ntInvalidationState) | 3266 void LayoutObject::clearPaintInvalidationState(const PaintInvalidationState& pai
ntInvalidationState) |
3264 { | 3267 { |
3265 // paintInvalidationStateIsDirty should be kept in sync with the | 3268 // paintInvalidationStateIsDirty should be kept in sync with the |
3266 // booleans that are cleared below. | 3269 // booleans that are cleared below. |
3267 ASSERT(paintInvalidationState.forcedSubtreeInvalidationWithinContainer() ||
paintInvalidationState.forcedSubtreeInvalidationRectUpdateWithinContainer() || p
aintInvalidationStateIsDirty()); | 3270 ASSERT(paintInvalidationState.forcedSubtreeInvalidationWithinContainer() ||
paintInvalidationState.forcedSubtreeInvalidationRectUpdateWithinContainer() || p
aintInvalidationStateIsDirty()); |
3268 clearShouldDoFullPaintInvalidation(); | 3271 clearShouldDoFullPaintInvalidation(); |
3269 m_bitfields.setChildShouldCheckForPaintInvalidation(false); | 3272 m_bitfields.setChildShouldCheckForPaintInvalidation(false); |
3270 m_bitfields.setNeededLayoutBecauseOfChildren(false); | 3273 m_bitfields.setNeededLayoutBecauseOfChildren(false); |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3486 const blink::LayoutObject* root = object1; | 3489 const blink::LayoutObject* root = object1; |
3487 while (root->parent()) | 3490 while (root->parent()) |
3488 root = root->parent(); | 3491 root = root->parent(); |
3489 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3492 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
3490 } else { | 3493 } else { |
3491 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); | 3494 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); |
3492 } | 3495 } |
3493 } | 3496 } |
3494 | 3497 |
3495 #endif | 3498 #endif |
OLD | NEW |