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 1176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1187 paintRect.intersect(frameView->visibleContentRect()); | 1187 paintRect.intersect(frameView->visibleContentRect()); |
1188 if (paintRect.isEmpty()) | 1188 if (paintRect.isEmpty()) |
1189 return; | 1189 return; |
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::slimmingPaintV2Enabled()) |
1198 return; | 1198 return; |
1199 | 1199 |
1200 if (paintInvalidationContainer.frameView()->shouldThrottleRendering()) | 1200 if (paintInvalidationContainer.frameView()->shouldThrottleRendering()) |
1201 return; | 1201 return; |
1202 | 1202 |
1203 ASSERT(gDisablePaintInvalidationStateAsserts || document().lifecycle().state
() == DocumentLifecycle::InPaintInvalidation); | 1203 ASSERT(gDisablePaintInvalidationStateAsserts || document().lifecycle().state
() == DocumentLifecycle::InPaintInvalidation); |
1204 | 1204 |
1205 if (dirtyRect.isEmpty()) | 1205 if (dirtyRect.isEmpty()) |
1206 return; | 1206 return; |
1207 | 1207 |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1439 if (invalidationReason == PaintInvalidationIncremental) { | 1439 if (invalidationReason == PaintInvalidationIncremental) { |
1440 incrementallyInvalidatePaint(paintInvalidationContainer, oldBounds, newB
ounds, newLocation); | 1440 incrementallyInvalidatePaint(paintInvalidationContainer, oldBounds, newB
ounds, newLocation); |
1441 return invalidationReason; | 1441 return invalidationReason; |
1442 } | 1442 } |
1443 | 1443 |
1444 fullyInvalidatePaint(paintInvalidationContainer, invalidationReason, oldBoun
ds, newBounds); | 1444 fullyInvalidatePaint(paintInvalidationContainer, invalidationReason, oldBoun
ds, newBounds); |
1445 | 1445 |
1446 return invalidationReason; | 1446 return invalidationReason; |
1447 } | 1447 } |
1448 | 1448 |
1449 void LayoutObject::invalidatePaintIfNeededForSynchronizedPainting(const PaintInf
o& paintInfo) | |
1450 { | |
1451 ASSERT(RuntimeEnabledFeatures::slimmingPaintSynchronizedPaintingEnabled()); | |
1452 ASSERT(document().lifecycle().state() == DocumentLifecycle::InPaint); | |
1453 ASSERT(paintInfo.paintInvalidationState); | |
1454 ASSERT(paintInfo.paintContainer()); | |
1455 | |
1456 PaintController& paintController = paintInfo.context->paintController(); | |
1457 if (paintController.clientHasCheckedPaintInvalidation(displayItemClient()))
{ | |
1458 ASSERT(paintController.clientCacheIsValid(displayItemClient()) | |
1459 == (invalidatePaintIfNeeded(*paintInfo.paintInvalidationState, *pain
tInfo.paintContainer()) == PaintInvalidationNone)); | |
1460 return; | |
1461 } | |
1462 | |
1463 PaintInvalidationReason reason = invalidatePaintIfNeeded(*paintInfo.paintInv
alidationState, *paintInfo.paintContainer()); | |
1464 clearPaintInvalidationState(*paintInfo.paintInvalidationState); | |
1465 | |
1466 if (reason == PaintInvalidationDelayedFull) | |
1467 paintInfo.paintInvalidationState->pushDelayedPaintInvalidationTarget(*th
is); | |
1468 | |
1469 paintController.setClientHasCheckedPaintInvalidation(displayItemClient()); | |
1470 } | |
1471 | |
1472 PaintInvalidationReason LayoutObject::paintInvalidationReason(const LayoutBoxMod
elObject& paintInvalidationContainer, | 1449 PaintInvalidationReason LayoutObject::paintInvalidationReason(const LayoutBoxMod
elObject& paintInvalidationContainer, |
1473 const LayoutRect& oldBounds, const LayoutPoint& oldPositionFromPaintInvalida
tionBacking, | 1450 const LayoutRect& oldBounds, const LayoutPoint& oldPositionFromPaintInvalida
tionBacking, |
1474 const LayoutRect& newBounds, const LayoutPoint& newPositionFromPaintInvalida
tionBacking) const | 1451 const LayoutRect& newBounds, const LayoutPoint& newPositionFromPaintInvalida
tionBacking) const |
1475 { | 1452 { |
1476 // First check for InvalidationLocationChange to avoid it from being hidden
by other | 1453 // First check for InvalidationLocationChange to avoid it from being hidden
by other |
1477 // invalidation reasons because we'll need to force check for paint invalida
tion for | 1454 // invalidation reasons because we'll need to force check for paint invalida
tion for |
1478 // children when location of this object changed. | 1455 // children when location of this object changed. |
1479 if (newPositionFromPaintInvalidationBacking != oldPositionFromPaintInvalidat
ionBacking) | 1456 if (newPositionFromPaintInvalidationBacking != oldPositionFromPaintInvalidat
ionBacking) |
1480 return PaintInvalidationLocationChange; | 1457 return PaintInvalidationLocationChange; |
1481 | 1458 |
(...skipping 2007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3489 const blink::LayoutObject* root = object1; | 3466 const blink::LayoutObject* root = object1; |
3490 while (root->parent()) | 3467 while (root->parent()) |
3491 root = root->parent(); | 3468 root = root->parent(); |
3492 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3469 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
3493 } else { | 3470 } else { |
3494 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); | 3471 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); |
3495 } | 3472 } |
3496 } | 3473 } |
3497 | 3474 |
3498 #endif | 3475 #endif |
OLD | NEW |