| 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 1196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1207 // FIXME: Unify "devtools.timeline.invalidationTracking" and "blink.invalida
tion". crbug.com/413527. | 1207 // FIXME: Unify "devtools.timeline.invalidationTracking" and "blink.invalida
tion". crbug.com/413527. |
| 1208 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline.invalidati
onTracking"), | 1208 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline.invalidati
onTracking"), |
| 1209 "PaintInvalidationTracking", | 1209 "PaintInvalidationTracking", |
| 1210 TRACE_EVENT_SCOPE_THREAD, | 1210 TRACE_EVENT_SCOPE_THREAD, |
| 1211 "data", InspectorPaintInvalidationTrackingEvent::data(this, paintInvalid
ationContainer)); | 1211 "data", InspectorPaintInvalidationTrackingEvent::data(this, paintInvalid
ationContainer)); |
| 1212 TRACE_EVENT2(TRACE_DISABLED_BY_DEFAULT("blink.invalidation"), "LayoutObject:
:invalidatePaintUsingContainer()", | 1212 TRACE_EVENT2(TRACE_DISABLED_BY_DEFAULT("blink.invalidation"), "LayoutObject:
:invalidatePaintUsingContainer()", |
| 1213 "object", this->debugName().ascii(), | 1213 "object", this->debugName().ascii(), |
| 1214 "info", jsonObjectForPaintInvalidationInfo(dirtyRect, paintInvalidationR
easonToString(invalidationReason))); | 1214 "info", jsonObjectForPaintInvalidationInfo(dirtyRect, paintInvalidationR
easonToString(invalidationReason))); |
| 1215 | 1215 |
| 1216 // This conditional handles situations where non-rooted (and hence non-compo
sited) frames are | 1216 // This conditional handles situations where non-rooted (and hence non-compo
sited) frames are |
| 1217 // painted, such as SVG images. | 1217 // painted, such as SVG images. |
| 1218 if (!paintInvalidationContainer.isPaintInvalidationContainer()) | 1218 if (!paintInvalidationContainer.isPaintInvalidationContainer()) |
| 1219 invalidatePaintRectangleOnWindow(paintInvalidationContainer, enclosingIn
tRect(dirtyRect)); | 1219 invalidatePaintRectangleOnWindow(paintInvalidationContainer, enclosingIn
tRect(dirtyRect)); |
| 1220 | 1220 |
| 1221 if (paintInvalidationContainer.view()->usesCompositing() && paintInvalidatio
nContainer.isPaintInvalidationContainer()) | 1221 if (paintInvalidationContainer.view()->usesCompositing() && paintInvalidatio
nContainer.isPaintInvalidationContainer()) |
| 1222 paintInvalidationContainer.setBackingNeedsPaintInvalidationInRect(dirtyR
ect, invalidationReason); | 1222 paintInvalidationContainer.setBackingNeedsPaintInvalidationInRect(dirtyR
ect, invalidationReason); |
| 1223 } | 1223 } |
| 1224 | 1224 |
| 1225 void LayoutObject::invalidateDisplayItemClient(const DisplayItemClientWrapper& d
isplayItemClient) const | 1225 void LayoutObject::invalidateDisplayItemClient(const DisplayItemClientWrapper& d
isplayItemClient) const |
| 1226 { | 1226 { |
| 1227 // Not using enclosingCompositedContainer() directly because this object may
be in an orphaned subtree. | 1227 // Not using enclosingCompositedContainer() directly because this object may
be in an orphaned subtree. |
| 1228 if (PaintLayer* enclosingLayer = this->enclosingLayer()) { | 1228 if (PaintLayer* enclosingLayer = this->enclosingLayer()) { |
| 1229 // This is valid because we want to invalidate the client in the display
item list of the current backing. | 1229 // This is valid because we want to invalidate the client in the display
item list of the current backing. |
| 1230 DisableCompositingQueryAsserts disabler; | 1230 DisableCompositingQueryAsserts disabler; |
| 1231 // Only the object needs to be invalidated, so use an empty invalidation
rect. | 1231 // Only the object needs to be invalidated, so use an empty invalidation
rect. |
| 1232 LayoutRect invalidationRect; | 1232 LayoutRect invalidationRect; |
| 1233 if (const PaintLayer* paintInvalidationLayer = enclosingLayer->enclosing
LayerForPaintInvalidationCrossingFrameBoundaries()) | 1233 if (const PaintLayer* paintInvalidationLayer = enclosingLayer->enclosing
LayerForPaintInvalidationCrossingFrameBoundaries()) |
| 1234 paintInvalidationLayer->layoutObject()->invalidateDisplayItemClientO
nBacking(displayItemClient, PaintInvalidationFull, invalidationRect, invalidatio
nRect); | 1234 paintInvalidationLayer->layoutObject()->invalidateDisplayItemClientO
nBacking(displayItemClient, PaintInvalidationFull, invalidationRect, invalidatio
nRect); |
| 1235 | 1235 |
| 1236 enclosingLayer->setNeedsRepaint(); | 1236 enclosingLayer->setNeedsRepaint(); |
| 1237 } | 1237 } |
| 1238 } | 1238 } |
| 1239 | 1239 |
| 1240 void LayoutObject::invalidateDisplayItemClients(const LayoutBoxModelObject& pain
tInvalidationContainer, PaintInvalidationReason invalidationReason, const Layout
Rect& previousPaintInvalidationRect, const LayoutRect& newPaintInvalidationRect)
const | 1240 void LayoutObject::invalidateDisplayItemClients(const LayoutBoxModelObject& pain
tInvalidationContainer, PaintInvalidationReason invalidationReason, const Layout
Rect& previousPaintInvalidationRect, const LayoutRect& newPaintInvalidationRect)
const |
| 1241 { | 1241 { |
| 1242 paintInvalidationContainer.invalidateDisplayItemClientOnBacking(*this, inval
idationReason, previousPaintInvalidationRect, newPaintInvalidationRect); | 1242 paintInvalidationContainer.invalidateDisplayItemClientOnBacking(*this, inval
idationReason, previousPaintInvalidationRect, newPaintInvalidationRect); |
| 1243 | 1243 |
| 1244 if (PaintLayer* enclosingLayer = this->enclosingLayer()) | 1244 if (PaintLayer* enclosingLayer = this->enclosingLayer()) |
| 1245 enclosingLayer->setNeedsRepaint(); | 1245 enclosingLayer->setNeedsRepaint(); |
| 1246 } | 1246 } |
| 1247 | 1247 |
| 1248 LayoutRect LayoutObject::boundsRectForPaintInvalidation(const LayoutBoxModelObje
ct* paintInvalidationContainer, const PaintInvalidationState* paintInvalidationS
tate) const | 1248 LayoutRect LayoutObject::boundsRectForPaintInvalidation(const LayoutBoxModelObje
ct* paintInvalidationContainer, const PaintInvalidationState* paintInvalidationS
tate) const |
| 1249 { | 1249 { |
| 1250 if (!paintInvalidationContainer) | 1250 if (!paintInvalidationContainer) |
| 1251 return computePaintInvalidationRect(paintInvalidationContainer, paintInv
alidationState); | 1251 return computePaintInvalidationRect(paintInvalidationContainer, paintInv
alidationState); |
| (...skipping 2234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3486 const blink::LayoutObject* root = object1; | 3486 const blink::LayoutObject* root = object1; |
| 3487 while (root->parent()) | 3487 while (root->parent()) |
| 3488 root = root->parent(); | 3488 root = root->parent(); |
| 3489 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3489 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
| 3490 } else { | 3490 } else { |
| 3491 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); | 3491 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); |
| 3492 } | 3492 } |
| 3493 } | 3493 } |
| 3494 | 3494 |
| 3495 #endif | 3495 #endif |
| OLD | NEW |