| 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) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
| 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
| 7 * Copyright (C) 2010 Google Inc. All rights reserved. | 7 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() | 375 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() |
| 376 && previousPaintInvalidationRect != this->previousPaintInvalidationRect(
) | 376 && previousPaintInvalidationRect != this->previousPaintInvalidationRect(
) |
| 377 && !usesCompositedScrolling() | 377 && !usesCompositedScrolling() |
| 378 && hasOverflowClip()) | 378 && hasOverflowClip()) |
| 379 newPaintInvalidationState.setForceSubtreeInvalidationRectUpdateWithinCon
tainer(); | 379 newPaintInvalidationState.setForceSubtreeInvalidationRectUpdateWithinCon
tainer(); |
| 380 | 380 |
| 381 newPaintInvalidationState.updateForChildren(); | 381 newPaintInvalidationState.updateForChildren(); |
| 382 invalidatePaintOfSubtreesIfNeeded(newPaintInvalidationState); | 382 invalidatePaintOfSubtreesIfNeeded(newPaintInvalidationState); |
| 383 } | 383 } |
| 384 | 384 |
| 385 void LayoutBoxModelObject::setBackingNeedsPaintInvalidationInRect(const LayoutRe
ct& r, PaintInvalidationReason invalidationReason) const | 385 void LayoutBoxModelObject::setBackingNeedsPaintInvalidationInRect(const LayoutRe
ct& r, PaintInvalidationReason invalidationReason, const LayoutObject& object) c
onst |
| 386 { | 386 { |
| 387 // TODO(wangxianzhu): Enable the following assert after paint invalidation f
or spv2 is ready. | 387 // TODO(wangxianzhu): Enable the following assert after paint invalidation f
or spv2 is ready. |
| 388 // ASSERT(!RuntimeEnabledFeatures::slimmingPaintV2Enabled()); | 388 // ASSERT(!RuntimeEnabledFeatures::slimmingPaintV2Enabled()); |
| 389 | 389 |
| 390 // https://bugs.webkit.org/show_bug.cgi?id=61159 describes an unreproducible
crash here, | 390 // https://bugs.webkit.org/show_bug.cgi?id=61159 describes an unreproducible
crash here, |
| 391 // so assert but check that the layer is composited. | 391 // so assert but check that the layer is composited. |
| 392 ASSERT(compositingState() != NotComposited); | 392 ASSERT(compositingState() != NotComposited); |
| 393 | 393 |
| 394 // FIXME: generalize accessors to backing GraphicsLayers so that this code i
s squashing-agnostic. | 394 // FIXME: generalize accessors to backing GraphicsLayers so that this code i
s squashing-agnostic. |
| 395 if (layer()->groupedMapping()) { | 395 if (layer()->groupedMapping()) { |
| 396 LayoutRect paintInvalidationRect = r; | 396 LayoutRect paintInvalidationRect = r; |
| 397 if (GraphicsLayer* squashingLayer = layer()->groupedMapping()->squashing
Layer()) { | 397 if (GraphicsLayer* squashingLayer = layer()->groupedMapping()->squashing
Layer()) { |
| 398 // Note: the subpixel accumulation of layer() does not need to be ad
ded here. It is already taken into account. | 398 // Note: the subpixel accumulation of layer() does not need to be ad
ded here. It is already taken into account. |
| 399 squashingLayer->setNeedsDisplayInRect(enclosingIntRect(paintInvalida
tionRect), invalidationReason); | 399 squashingLayer->setNeedsDisplayInRect(enclosingIntRect(paintInvalida
tionRect), invalidationReason, object); |
| 400 } | 400 } |
| 401 } else { | 401 } else { |
| 402 layer()->compositedLayerMapping()->setContentsNeedDisplayInRect(r, inval
idationReason); | 402 layer()->compositedLayerMapping()->setContentsNeedDisplayInRect(r, inval
idationReason, object); |
| 403 } | 403 } |
| 404 } | 404 } |
| 405 | 405 |
| 406 void LayoutBoxModelObject::invalidateDisplayItemClientOnBacking(const DisplayIte
mClient& displayItemClient, PaintInvalidationReason invalidationReason) const | 406 void LayoutBoxModelObject::invalidateDisplayItemClientOnBacking(const DisplayIte
mClient& displayItemClient, PaintInvalidationReason invalidationReason) const |
| 407 { | 407 { |
| 408 if (layer()->groupedMapping()) { | 408 if (layer()->groupedMapping()) { |
| 409 if (GraphicsLayer* squashingLayer = layer()->groupedMapping()->squashing
Layer()) | 409 if (GraphicsLayer* squashingLayer = layer()->groupedMapping()->squashing
Layer()) |
| 410 squashingLayer->invalidateDisplayItemClient(displayItemClient, inval
idationReason); | 410 squashingLayer->invalidateDisplayItemClient(displayItemClient, inval
idationReason); |
| 411 } else if (CompositedLayerMapping* compositedLayerMapping = layer()->composi
tedLayerMapping()) { | 411 } else if (CompositedLayerMapping* compositedLayerMapping = layer()->composi
tedLayerMapping()) { |
| 412 compositedLayerMapping->invalidateDisplayItemClient(displayItemClient, i
nvalidationReason); | 412 compositedLayerMapping->invalidateDisplayItemClient(displayItemClient, i
nvalidationReason); |
| (...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 959 if (rootElementStyle->hasBackground()) | 959 if (rootElementStyle->hasBackground()) |
| 960 return false; | 960 return false; |
| 961 | 961 |
| 962 if (node() != document().firstBodyElement()) | 962 if (node() != document().firstBodyElement()) |
| 963 return false; | 963 return false; |
| 964 | 964 |
| 965 return true; | 965 return true; |
| 966 } | 966 } |
| 967 | 967 |
| 968 } // namespace blink | 968 } // namespace blink |
| OLD | NEW |