| 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 #include "core/paint/PaintLayer.h" | 79 #include "core/paint/PaintLayer.h" |
| 80 #include "core/style/ContentData.h" | 80 #include "core/style/ContentData.h" |
| 81 #include "core/style/ShadowList.h" | 81 #include "core/style/ShadowList.h" |
| 82 #include "platform/HostWindow.h" | 82 #include "platform/HostWindow.h" |
| 83 #include "platform/JSONValues.h" | 83 #include "platform/JSONValues.h" |
| 84 #include "platform/RuntimeEnabledFeatures.h" | 84 #include "platform/RuntimeEnabledFeatures.h" |
| 85 #include "platform/TraceEvent.h" | 85 #include "platform/TraceEvent.h" |
| 86 #include "platform/TracedValue.h" | 86 #include "platform/TracedValue.h" |
| 87 #include "platform/geometry/TransformState.h" | 87 #include "platform/geometry/TransformState.h" |
| 88 #include "platform/graphics/GraphicsContext.h" | 88 #include "platform/graphics/GraphicsContext.h" |
| 89 #include "platform/graphics/paint/DisplayItemList.h" | 89 #include "platform/graphics/paint/PaintController.h" |
| 90 #include "wtf/Partitions.h" | 90 #include "wtf/Partitions.h" |
| 91 #include "wtf/RefCountedLeakCounter.h" | 91 #include "wtf/RefCountedLeakCounter.h" |
| 92 #include "wtf/text/StringBuilder.h" | 92 #include "wtf/text/StringBuilder.h" |
| 93 #include "wtf/text/WTFString.h" | 93 #include "wtf/text/WTFString.h" |
| 94 #include <algorithm> | 94 #include <algorithm> |
| 95 #ifndef NDEBUG | 95 #ifndef NDEBUG |
| 96 #include <stdio.h> | 96 #include <stdio.h> |
| 97 #endif | 97 #endif |
| 98 | 98 |
| 99 namespace blink { | 99 namespace blink { |
| (...skipping 1343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1443 return invalidationReason; | 1443 return invalidationReason; |
| 1444 } | 1444 } |
| 1445 | 1445 |
| 1446 void LayoutObject::invalidatePaintIfNeededForSynchronizedPainting(const PaintInf
o& paintInfo) | 1446 void LayoutObject::invalidatePaintIfNeededForSynchronizedPainting(const PaintInf
o& paintInfo) |
| 1447 { | 1447 { |
| 1448 ASSERT(RuntimeEnabledFeatures::slimmingPaintSynchronizedPaintingEnabled()); | 1448 ASSERT(RuntimeEnabledFeatures::slimmingPaintSynchronizedPaintingEnabled()); |
| 1449 ASSERT(document().lifecycle().state() == DocumentLifecycle::InPaint); | 1449 ASSERT(document().lifecycle().state() == DocumentLifecycle::InPaint); |
| 1450 ASSERT(paintInfo.paintInvalidationState); | 1450 ASSERT(paintInfo.paintInvalidationState); |
| 1451 ASSERT(paintInfo.paintContainer()); | 1451 ASSERT(paintInfo.paintContainer()); |
| 1452 | 1452 |
| 1453 DisplayItemList* displayItemList = paintInfo.context->displayItemList(); | 1453 PaintController* paintController = paintInfo.context->paintController(); |
| 1454 if (displayItemList->clientHasCheckedPaintInvalidation(displayItemClient()))
{ | 1454 if (paintController->clientHasCheckedPaintInvalidation(displayItemClient()))
{ |
| 1455 ASSERT(displayItemList->clientCacheIsValid(displayItemClient()) | 1455 ASSERT(paintController->clientCacheIsValid(displayItemClient()) |
| 1456 == (invalidatePaintIfNeeded(*paintInfo.paintInvalidationState, *pain
tInfo.paintContainer()) == PaintInvalidationNone)); | 1456 == (invalidatePaintIfNeeded(*paintInfo.paintInvalidationState, *pain
tInfo.paintContainer()) == PaintInvalidationNone)); |
| 1457 return; | 1457 return; |
| 1458 } | 1458 } |
| 1459 | 1459 |
| 1460 PaintInvalidationReason reason = invalidatePaintIfNeeded(*paintInfo.paintInv
alidationState, *paintInfo.paintContainer()); | 1460 PaintInvalidationReason reason = invalidatePaintIfNeeded(*paintInfo.paintInv
alidationState, *paintInfo.paintContainer()); |
| 1461 clearPaintInvalidationState(*paintInfo.paintInvalidationState); | 1461 clearPaintInvalidationState(*paintInfo.paintInvalidationState); |
| 1462 | 1462 |
| 1463 if (reason == PaintInvalidationDelayedFull) | 1463 if (reason == PaintInvalidationDelayedFull) |
| 1464 paintInfo.paintInvalidationState->pushDelayedPaintInvalidationTarget(*th
is); | 1464 paintInfo.paintInvalidationState->pushDelayedPaintInvalidationTarget(*th
is); |
| 1465 | 1465 |
| 1466 displayItemList->setClientHasCheckedPaintInvalidation(displayItemClient()); | 1466 paintController->setClientHasCheckedPaintInvalidation(displayItemClient()); |
| 1467 } | 1467 } |
| 1468 | 1468 |
| 1469 PaintInvalidationReason LayoutObject::paintInvalidationReason(const LayoutBoxMod
elObject& paintInvalidationContainer, | 1469 PaintInvalidationReason LayoutObject::paintInvalidationReason(const LayoutBoxMod
elObject& paintInvalidationContainer, |
| 1470 const LayoutRect& oldBounds, const LayoutPoint& oldPositionFromPaintInvalida
tionBacking, | 1470 const LayoutRect& oldBounds, const LayoutPoint& oldPositionFromPaintInvalida
tionBacking, |
| 1471 const LayoutRect& newBounds, const LayoutPoint& newPositionFromPaintInvalida
tionBacking) const | 1471 const LayoutRect& newBounds, const LayoutPoint& newPositionFromPaintInvalida
tionBacking) const |
| 1472 { | 1472 { |
| 1473 // First check for InvalidationLocationChange to avoid it from being hidden
by other | 1473 // First check for InvalidationLocationChange to avoid it from being hidden
by other |
| 1474 // invalidation reasons because we'll need to force check for paint invalida
tion for | 1474 // invalidation reasons because we'll need to force check for paint invalida
tion for |
| 1475 // children when location of this object changed. | 1475 // children when location of this object changed. |
| 1476 if (newPositionFromPaintInvalidationBacking != oldPositionFromPaintInvalidat
ionBacking) | 1476 if (newPositionFromPaintInvalidationBacking != oldPositionFromPaintInvalidat
ionBacking) |
| (...skipping 1991 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3468 const blink::LayoutObject* root = object1; | 3468 const blink::LayoutObject* root = object1; |
| 3469 while (root->parent()) | 3469 while (root->parent()) |
| 3470 root = root->parent(); | 3470 root = root->parent(); |
| 3471 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3471 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
| 3472 } else { | 3472 } else { |
| 3473 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); | 3473 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); |
| 3474 } | 3474 } |
| 3475 } | 3475 } |
| 3476 | 3476 |
| 3477 #endif | 3477 #endif |
| OLD | NEW |