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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 #include "core/layout/LayoutTableCaption.h" | 69 #include "core/layout/LayoutTableCaption.h" |
70 #include "core/layout/LayoutTableCell.h" | 70 #include "core/layout/LayoutTableCell.h" |
71 #include "core/layout/LayoutTableCol.h" | 71 #include "core/layout/LayoutTableCol.h" |
72 #include "core/layout/LayoutTableRow.h" | 72 #include "core/layout/LayoutTableRow.h" |
73 #include "core/layout/LayoutTheme.h" | 73 #include "core/layout/LayoutTheme.h" |
74 #include "core/layout/LayoutView.h" | 74 #include "core/layout/LayoutView.h" |
75 #include "core/layout/compositing/PaintLayerCompositor.h" | 75 #include "core/layout/compositing/PaintLayerCompositor.h" |
76 #include "core/page/AutoscrollController.h" | 76 #include "core/page/AutoscrollController.h" |
77 #include "core/page/Page.h" | 77 #include "core/page/Page.h" |
78 #include "core/paint/ObjectPainter.h" | 78 #include "core/paint/ObjectPainter.h" |
| 79 #include "core/paint/PaintInfo.h" |
79 #include "core/paint/PaintLayer.h" | 80 #include "core/paint/PaintLayer.h" |
80 #include "core/style/ContentData.h" | 81 #include "core/style/ContentData.h" |
81 #include "core/style/ShadowList.h" | 82 #include "core/style/ShadowList.h" |
82 #include "platform/JSONValues.h" | 83 #include "platform/JSONValues.h" |
83 #include "platform/RuntimeEnabledFeatures.h" | 84 #include "platform/RuntimeEnabledFeatures.h" |
84 #include "platform/TraceEvent.h" | 85 #include "platform/TraceEvent.h" |
85 #include "platform/TracedValue.h" | 86 #include "platform/TracedValue.h" |
86 #include "platform/geometry/TransformState.h" | 87 #include "platform/geometry/TransformState.h" |
87 #include "platform/graphics/GraphicsContext.h" | 88 #include "platform/graphics/GraphicsContext.h" |
88 #include "platform/graphics/paint/DisplayItemList.h" | 89 #include "platform/graphics/paint/DisplayItemList.h" |
(...skipping 1320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1409 if (invalidationReason == PaintInvalidationIncremental) { | 1410 if (invalidationReason == PaintInvalidationIncremental) { |
1410 incrementallyInvalidatePaint(paintInvalidationContainer, oldBounds, newB
ounds, newLocation); | 1411 incrementallyInvalidatePaint(paintInvalidationContainer, oldBounds, newB
ounds, newLocation); |
1411 return invalidationReason; | 1412 return invalidationReason; |
1412 } | 1413 } |
1413 | 1414 |
1414 fullyInvalidatePaint(paintInvalidationContainer, invalidationReason, oldBoun
ds, newBounds); | 1415 fullyInvalidatePaint(paintInvalidationContainer, invalidationReason, oldBoun
ds, newBounds); |
1415 | 1416 |
1416 return invalidationReason; | 1417 return invalidationReason; |
1417 } | 1418 } |
1418 | 1419 |
| 1420 void LayoutObject::invalidatePaintIfNeededForSynchronizedPainting(const PaintInf
o& paintInfo) |
| 1421 { |
| 1422 ASSERT(RuntimeEnabledFeatures::slimmingPaintSynchronizedPaintingEnabled()); |
| 1423 ASSERT(document().lifecycle().state() == DocumentLifecycle::InPaint); |
| 1424 ASSERT(paintInfo.paintInvalidationState); |
| 1425 ASSERT(paintInfo.paintContainer()); |
| 1426 |
| 1427 DisplayItemList* displayItemList = paintInfo.context->displayItemList(); |
| 1428 if (displayItemList->clientHasCheckedPaintInvalidation(displayItemClient()))
{ |
| 1429 ASSERT(displayItemList->clientCacheIsValid(displayItemClient()) |
| 1430 == (invalidatePaintIfNeeded(*paintInfo.paintInvalidationState, *pain
tInfo.paintContainer()) == PaintInvalidationNone)); |
| 1431 return; |
| 1432 } |
| 1433 |
| 1434 PaintInvalidationReason reason = invalidatePaintIfNeeded(*paintInfo.paintInv
alidationState, *paintInfo.paintContainer()); |
| 1435 clearPaintInvalidationState(*paintInfo.paintInvalidationState); |
| 1436 |
| 1437 if (reason == PaintInvalidationDelayedFull) |
| 1438 paintInfo.paintInvalidationState->pushDelayedPaintInvalidationTarget(*th
is); |
| 1439 |
| 1440 displayItemList->setClientHasCheckedPaintInvalidation(displayItemClient()); |
| 1441 } |
| 1442 |
1419 PaintInvalidationReason LayoutObject::paintInvalidationReason(const LayoutBoxMod
elObject& paintInvalidationContainer, | 1443 PaintInvalidationReason LayoutObject::paintInvalidationReason(const LayoutBoxMod
elObject& paintInvalidationContainer, |
1420 const LayoutRect& oldBounds, const LayoutPoint& oldPositionFromPaintInvalida
tionBacking, | 1444 const LayoutRect& oldBounds, const LayoutPoint& oldPositionFromPaintInvalida
tionBacking, |
1421 const LayoutRect& newBounds, const LayoutPoint& newPositionFromPaintInvalida
tionBacking) const | 1445 const LayoutRect& newBounds, const LayoutPoint& newPositionFromPaintInvalida
tionBacking) const |
1422 { | 1446 { |
1423 // First check for InvalidationLocationChange to avoid it from being hidden
by other | 1447 // First check for InvalidationLocationChange to avoid it from being hidden
by other |
1424 // invalidation reasons because we'll need to force check for paint invalida
tion for | 1448 // invalidation reasons because we'll need to force check for paint invalida
tion for |
1425 // children when location of this object changed. | 1449 // children when location of this object changed. |
1426 if (newPositionFromPaintInvalidationBacking != oldPositionFromPaintInvalidat
ionBacking) | 1450 if (newPositionFromPaintInvalidationBacking != oldPositionFromPaintInvalidat
ionBacking) |
1427 return PaintInvalidationLocationChange; | 1451 return PaintInvalidationLocationChange; |
1428 | 1452 |
(...skipping 2006 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3435 const blink::LayoutObject* root = object1; | 3459 const blink::LayoutObject* root = object1; |
3436 while (root->parent()) | 3460 while (root->parent()) |
3437 root = root->parent(); | 3461 root = root->parent(); |
3438 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3462 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
3439 } else { | 3463 } else { |
3440 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); | 3464 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); |
3441 } | 3465 } |
3442 } | 3466 } |
3443 | 3467 |
3444 #endif | 3468 #endif |
OLD | NEW |