| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
reserved. |
| 3 * | 3 * |
| 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
| 5 * | 5 * |
| 6 * Other contributors: | 6 * Other contributors: |
| 7 * Robert O'Callahan <roc+@cs.cmu.edu> | 7 * Robert O'Callahan <roc+@cs.cmu.edu> |
| 8 * David Baron <dbaron@fas.harvard.edu> | 8 * David Baron <dbaron@fas.harvard.edu> |
| 9 * Christian Biesinger <cbiesinger@web.de> | 9 * Christian Biesinger <cbiesinger@web.de> |
| 10 * Randall Jesup <rjesup@wgate.com> | 10 * Randall Jesup <rjesup@wgate.com> |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 if (layoutObject()->frame() && layoutObject()->frame()->page()) { | 154 if (layoutObject()->frame() && layoutObject()->frame()->page()) { |
| 155 if (ScrollingCoordinator* scrollingCoordinator = layoutObject()->frame()
->page()->scrollingCoordinator()) | 155 if (ScrollingCoordinator* scrollingCoordinator = layoutObject()->frame()
->page()->scrollingCoordinator()) |
| 156 scrollingCoordinator->willDestroyLayer(this); | 156 scrollingCoordinator->willDestroyLayer(this); |
| 157 } | 157 } |
| 158 | 158 |
| 159 removeFilterInfoIfNeeded(); | 159 removeFilterInfoIfNeeded(); |
| 160 | 160 |
| 161 if (groupedMapping()) { | 161 if (groupedMapping()) { |
| 162 DisableCompositingQueryAsserts disabler; | 162 DisableCompositingQueryAsserts disabler; |
| 163 groupedMapping()->removeLayerFromSquashingGraphicsLayer(this); | 163 groupedMapping()->removeLayerFromSquashingGraphicsLayer(this); |
| 164 setGroupedMapping(0); | 164 setGroupedMapping(0, true); |
| 165 } | 165 } |
| 166 | 166 |
| 167 // Child layers will be deleted by their corresponding layout objects, so | 167 // Child layers will be deleted by their corresponding layout objects, so |
| 168 // we don't need to delete them ourselves. | 168 // we don't need to delete them ourselves. |
| 169 | 169 |
| 170 clearCompositedDeprecatedPaintLayerMapping(true); | 170 clearCompositedDeprecatedPaintLayerMapping(true); |
| 171 | 171 |
| 172 if (m_reflectionInfo) | 172 if (m_reflectionInfo) |
| 173 m_reflectionInfo->destroy(); | 173 m_reflectionInfo->destroy(); |
| 174 | 174 |
| (...skipping 2170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2345 if (DeprecatedPaintLayer* compositingParent = enclosingLayerWithComposit
edDeprecatedPaintLayerMapping(ExcludeSelf)) | 2345 if (DeprecatedPaintLayer* compositingParent = enclosingLayerWithComposit
edDeprecatedPaintLayerMapping(ExcludeSelf)) |
| 2346 compositingParent->compositedDeprecatedPaintLayerMapping()->setNeeds
GraphicsLayerUpdate(GraphicsLayerUpdateSubtree); | 2346 compositingParent->compositedDeprecatedPaintLayerMapping()->setNeeds
GraphicsLayerUpdate(GraphicsLayerUpdateSubtree); |
| 2347 } | 2347 } |
| 2348 | 2348 |
| 2349 m_compositedDeprecatedPaintLayerMapping.clear(); | 2349 m_compositedDeprecatedPaintLayerMapping.clear(); |
| 2350 | 2350 |
| 2351 if (!layerBeingDestroyed) | 2351 if (!layerBeingDestroyed) |
| 2352 updateOrRemoveFilterEffectBuilder(); | 2352 updateOrRemoveFilterEffectBuilder(); |
| 2353 } | 2353 } |
| 2354 | 2354 |
| 2355 void DeprecatedPaintLayer::setGroupedMapping(CompositedDeprecatedPaintLayerMappi
ng* groupedMapping, bool layerBeingDestroyed) | 2355 void DeprecatedPaintLayer::setGroupedMapping(CompositedDeprecatedPaintLayerMappi
ng* groupedMapping, bool issueInvalidations) |
| 2356 { | 2356 { |
| 2357 if (groupedMapping == m_groupedMapping) | 2357 if (groupedMapping == m_groupedMapping) |
| 2358 return; | 2358 return; |
| 2359 | 2359 |
| 2360 if (!layerBeingDestroyed && m_groupedMapping) { | 2360 if (issueInvalidations && m_groupedMapping) { |
| 2361 m_groupedMapping->setNeedsGraphicsLayerUpdate(GraphicsLayerUpdateSubtree
); | 2361 m_groupedMapping->setNeedsGraphicsLayerUpdate(GraphicsLayerUpdateSubtree
); |
| 2362 m_groupedMapping->removeLayerFromSquashingGraphicsLayer(this); | 2362 m_groupedMapping->removeLayerFromSquashingGraphicsLayer(this); |
| 2363 } | 2363 } |
| 2364 m_groupedMapping = groupedMapping; | 2364 m_groupedMapping = groupedMapping; |
| 2365 if (!layerBeingDestroyed && m_groupedMapping) | 2365 if (issueInvalidations && m_groupedMapping) |
| 2366 m_groupedMapping->setNeedsGraphicsLayerUpdate(GraphicsLayerUpdateSubtree
); | 2366 m_groupedMapping->setNeedsGraphicsLayerUpdate(GraphicsLayerUpdateSubtree
); |
| 2367 } | 2367 } |
| 2368 | 2368 |
| 2369 bool DeprecatedPaintLayer::hasCompositedMask() const | 2369 bool DeprecatedPaintLayer::hasCompositedMask() const |
| 2370 { | 2370 { |
| 2371 return m_compositedDeprecatedPaintLayerMapping && m_compositedDeprecatedPain
tLayerMapping->hasMaskLayer(); | 2371 return m_compositedDeprecatedPaintLayerMapping && m_compositedDeprecatedPain
tLayerMapping->hasMaskLayer(); |
| 2372 } | 2372 } |
| 2373 | 2373 |
| 2374 bool DeprecatedPaintLayer::hasCompositedClippingMask() const | 2374 bool DeprecatedPaintLayer::hasCompositedClippingMask() const |
| 2375 { | 2375 { |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2741 | 2741 |
| 2742 void showLayerTree(const blink::LayoutObject* layoutObject) | 2742 void showLayerTree(const blink::LayoutObject* layoutObject) |
| 2743 { | 2743 { |
| 2744 if (!layoutObject) { | 2744 if (!layoutObject) { |
| 2745 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); | 2745 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); |
| 2746 return; | 2746 return; |
| 2747 } | 2747 } |
| 2748 showLayerTree(layoutObject->enclosingLayer()); | 2748 showLayerTree(layoutObject->enclosingLayer()); |
| 2749 } | 2749 } |
| 2750 #endif | 2750 #endif |
| OLD | NEW |