OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
75 static inline bool isAcceleratedCanvas(RenderObject* renderer) | 75 static inline bool isAcceleratedCanvas(RenderObject* renderer) |
76 { | 76 { |
77 if (renderer->isCanvas()) { | 77 if (renderer->isCanvas()) { |
78 HTMLCanvasElement* canvas = static_cast<HTMLCanvasElement*>(renderer->no de()); | 78 HTMLCanvasElement* canvas = static_cast<HTMLCanvasElement*>(renderer->no de()); |
79 if (CanvasRenderingContext* context = canvas->renderingContext()) | 79 if (CanvasRenderingContext* context = canvas->renderingContext()) |
80 return context->isAccelerated(); | 80 return context->isAccelerated(); |
81 } | 81 } |
82 return false; | 82 return false; |
83 } | 83 } |
84 | 84 |
85 static inline bool shouldClipRoundedBorders(RenderObject* renderer) | |
86 { | |
87 return renderer->style()->hasBorderRadius() | |
88 && (isAcceleratedCanvas(renderer) | |
jamesr
2013/07/03 21:34:01
i'm not sure i understand the purpose of these che
rosca
2013/07/04 07:51:51
This is the first case, where the content being cl
| |
89 || (renderer->isEmbeddedObject() && toRenderEmbeddedObject(renderer) ->allowsAcceleratedCompositing()) | |
90 || renderer->isVideo()); | |
91 } | |
92 | |
85 // Get the scrolling coordinator in a way that works inside RenderLayerBacking's destructor. | 93 // Get the scrolling coordinator in a way that works inside RenderLayerBacking's destructor. |
86 static ScrollingCoordinator* scrollingCoordinatorFromLayer(RenderLayer* layer) | 94 static ScrollingCoordinator* scrollingCoordinatorFromLayer(RenderLayer* layer) |
87 { | 95 { |
88 Page* page = layer->renderer()->frame()->page(); | 96 Page* page = layer->renderer()->frame()->page(); |
89 if (!page) | 97 if (!page) |
90 return 0; | 98 return 0; |
91 | 99 |
92 return page->scrollingCoordinator(); | 100 return page->scrollingCoordinator(); |
93 } | 101 } |
94 | 102 |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
161 if (m_backgroundLayer) { | 169 if (m_backgroundLayer) { |
162 m_backgroundLayer->setShowDebugBorder(showBorder); | 170 m_backgroundLayer->setShowDebugBorder(showBorder); |
163 m_backgroundLayer->setShowRepaintCounter(showRepaintCounter); | 171 m_backgroundLayer->setShowRepaintCounter(showRepaintCounter); |
164 } | 172 } |
165 | 173 |
166 if (m_maskLayer) { | 174 if (m_maskLayer) { |
167 m_maskLayer->setShowDebugBorder(showBorder); | 175 m_maskLayer->setShowDebugBorder(showBorder); |
168 m_maskLayer->setShowRepaintCounter(showRepaintCounter); | 176 m_maskLayer->setShowRepaintCounter(showRepaintCounter); |
169 } | 177 } |
170 | 178 |
179 if (m_borderRadiusLayer) { | |
180 m_borderRadiusLayer->setShowDebugBorder(showBorder); | |
181 m_borderRadiusLayer->setShowRepaintCounter(showRepaintCounter); | |
182 } | |
183 | |
171 if (m_layerForHorizontalScrollbar) | 184 if (m_layerForHorizontalScrollbar) |
172 m_layerForHorizontalScrollbar->setShowDebugBorder(showBorder); | 185 m_layerForHorizontalScrollbar->setShowDebugBorder(showBorder); |
173 | 186 |
174 if (m_layerForVerticalScrollbar) | 187 if (m_layerForVerticalScrollbar) |
175 m_layerForVerticalScrollbar->setShowDebugBorder(showBorder); | 188 m_layerForVerticalScrollbar->setShowDebugBorder(showBorder); |
176 | 189 |
177 if (m_layerForScrollCorner) | 190 if (m_layerForScrollCorner) |
178 m_layerForScrollCorner->setShowDebugBorder(showBorder); | 191 m_layerForScrollCorner->setShowDebugBorder(showBorder); |
179 | 192 |
180 if (m_scrollingLayer) | 193 if (m_scrollingLayer) |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
213 if (m_graphicsLayer) | 226 if (m_graphicsLayer) |
214 m_graphicsLayer->removeFromParent(); | 227 m_graphicsLayer->removeFromParent(); |
215 | 228 |
216 m_ancestorClippingLayer = nullptr; | 229 m_ancestorClippingLayer = nullptr; |
217 m_contentsContainmentLayer = nullptr; | 230 m_contentsContainmentLayer = nullptr; |
218 m_graphicsLayer = nullptr; | 231 m_graphicsLayer = nullptr; |
219 m_foregroundLayer = nullptr; | 232 m_foregroundLayer = nullptr; |
220 m_backgroundLayer = nullptr; | 233 m_backgroundLayer = nullptr; |
221 m_childContainmentLayer = nullptr; | 234 m_childContainmentLayer = nullptr; |
222 m_maskLayer = nullptr; | 235 m_maskLayer = nullptr; |
236 m_borderRadiusLayer = nullptr; | |
223 | 237 |
224 m_scrollingLayer = nullptr; | 238 m_scrollingLayer = nullptr; |
225 m_scrollingContentsLayer = nullptr; | 239 m_scrollingContentsLayer = nullptr; |
226 } | 240 } |
227 | 241 |
228 void RenderLayerBacking::updateOpacity(const RenderStyle* style) | 242 void RenderLayerBacking::updateOpacity(const RenderStyle* style) |
229 { | 243 { |
230 m_graphicsLayer->setOpacity(compositingOpacity(style->opacity())); | 244 m_graphicsLayer->setOpacity(compositingOpacity(style->opacity())); |
231 } | 245 } |
232 | 246 |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
424 | 438 |
425 if (updateScrollingLayers(m_owningLayer->needsCompositedScrolling())) | 439 if (updateScrollingLayers(m_owningLayer->needsCompositedScrolling())) |
426 layerConfigChanged = true; | 440 layerConfigChanged = true; |
427 | 441 |
428 if (layerConfigChanged) | 442 if (layerConfigChanged) |
429 updateInternalHierarchy(); | 443 updateInternalHierarchy(); |
430 | 444 |
431 if (updateMaskLayer(renderer->hasMask())) | 445 if (updateMaskLayer(renderer->hasMask())) |
432 m_graphicsLayer->setMaskLayer(m_maskLayer.get()); | 446 m_graphicsLayer->setMaskLayer(m_maskLayer.get()); |
433 | 447 |
448 if (updateBorderRadiusLayer(shouldClipRoundedBorders(renderer))) | |
449 m_graphicsLayer->setBorderRadiusLayer(m_borderRadiusLayer.get()); | |
450 | |
434 if (m_owningLayer->hasReflection()) { | 451 if (m_owningLayer->hasReflection()) { |
435 if (m_owningLayer->reflectionLayer()->backing()) { | 452 if (m_owningLayer->reflectionLayer()->backing()) { |
436 GraphicsLayer* reflectionLayer = m_owningLayer->reflectionLayer()->b acking()->graphicsLayer(); | 453 GraphicsLayer* reflectionLayer = m_owningLayer->reflectionLayer()->b acking()->graphicsLayer(); |
437 m_graphicsLayer->setReplicatedByLayer(reflectionLayer); | 454 m_graphicsLayer->setReplicatedByLayer(reflectionLayer); |
438 } | 455 } |
439 } else | 456 } else |
440 m_graphicsLayer->setReplicatedByLayer(0); | 457 m_graphicsLayer->setReplicatedByLayer(0); |
441 | 458 |
442 updateBackgroundColor(isSimpleContainerCompositingLayer()); | 459 updateBackgroundColor(isSimpleContainerCompositingLayer()); |
443 updateRootLayerConfiguration(); | 460 updateRootLayerConfiguration(); |
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1059 m_maskLayer = nullptr; | 1076 m_maskLayer = nullptr; |
1060 layerChanged = true; | 1077 layerChanged = true; |
1061 } | 1078 } |
1062 | 1079 |
1063 if (layerChanged) | 1080 if (layerChanged) |
1064 m_graphicsLayer->setPaintingPhase(paintingPhaseForPrimaryLayer()); | 1081 m_graphicsLayer->setPaintingPhase(paintingPhaseForPrimaryLayer()); |
1065 | 1082 |
1066 return layerChanged; | 1083 return layerChanged; |
1067 } | 1084 } |
1068 | 1085 |
1086 bool RenderLayerBacking::updateBorderRadiusLayer(bool needsBorderRadiusLayer) | |
1087 { | |
1088 bool layerChanged = false; | |
1089 if (needsBorderRadiusLayer) { | |
1090 if (!m_borderRadiusLayer) { | |
1091 m_borderRadiusLayer = createGraphicsLayer("BorderRadiusMask", Compos itingReasonLayerForMask); | |
1092 m_borderRadiusLayer->setDrawsContent(true); | |
1093 m_borderRadiusLayer->setPaintingPhase(GraphicsLayerPaintBorderRadius Mask); | |
1094 layerChanged = true; | |
1095 } | |
1096 } else if (m_borderRadiusLayer) { | |
1097 m_borderRadiusLayer = nullptr; | |
1098 layerChanged = true; | |
1099 } | |
1100 return layerChanged; | |
1101 } | |
1102 | |
1069 bool RenderLayerBacking::updateScrollingLayers(bool needsScrollingLayers) | 1103 bool RenderLayerBacking::updateScrollingLayers(bool needsScrollingLayers) |
1070 { | 1104 { |
1071 ScrollingCoordinator* scrollingCoordinator = scrollingCoordinatorFromLayer(m _owningLayer); | 1105 ScrollingCoordinator* scrollingCoordinator = scrollingCoordinatorFromLayer(m _owningLayer); |
1072 | 1106 |
1073 bool layerChanged = false; | 1107 bool layerChanged = false; |
1074 if (needsScrollingLayers) { | 1108 if (needsScrollingLayers) { |
1075 if (!m_scrollingLayer) { | 1109 if (!m_scrollingLayer) { |
1076 // Outer layer which corresponds with the scroll view. | 1110 // Outer layer which corresponds with the scroll view. |
1077 m_scrollingLayer = createGraphicsLayer("Scrolling container", Compos itingReasonLayerForClip); | 1111 m_scrollingLayer = createGraphicsLayer("Scrolling container", Compos itingReasonLayerForClip); |
1078 m_scrollingLayer->setDrawsContent(false); | 1112 m_scrollingLayer->setDrawsContent(false); |
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1546 | 1580 |
1547 if (m_foregroundLayer && m_foregroundLayer->drawsContent()) | 1581 if (m_foregroundLayer && m_foregroundLayer->drawsContent()) |
1548 m_foregroundLayer->setNeedsDisplay(); | 1582 m_foregroundLayer->setNeedsDisplay(); |
1549 | 1583 |
1550 if (m_backgroundLayer && m_backgroundLayer->drawsContent()) | 1584 if (m_backgroundLayer && m_backgroundLayer->drawsContent()) |
1551 m_backgroundLayer->setNeedsDisplay(); | 1585 m_backgroundLayer->setNeedsDisplay(); |
1552 | 1586 |
1553 if (m_maskLayer && m_maskLayer->drawsContent()) | 1587 if (m_maskLayer && m_maskLayer->drawsContent()) |
1554 m_maskLayer->setNeedsDisplay(); | 1588 m_maskLayer->setNeedsDisplay(); |
1555 | 1589 |
1590 if (m_borderRadiusLayer && m_borderRadiusLayer->drawsContent()) | |
1591 m_borderRadiusLayer->setNeedsDisplay(); | |
1592 | |
1556 if (m_scrollingContentsLayer && m_scrollingContentsLayer->drawsContent()) | 1593 if (m_scrollingContentsLayer && m_scrollingContentsLayer->drawsContent()) |
1557 m_scrollingContentsLayer->setNeedsDisplay(); | 1594 m_scrollingContentsLayer->setNeedsDisplay(); |
1558 } | 1595 } |
1559 | 1596 |
1560 // r is in the coordinate space of the layer's render object | 1597 // r is in the coordinate space of the layer's render object |
1561 void RenderLayerBacking::setContentsNeedDisplayInRect(const IntRect& r) | 1598 void RenderLayerBacking::setContentsNeedDisplayInRect(const IntRect& r) |
1562 { | 1599 { |
1563 ASSERT(!paintsIntoCompositedAncestor()); | 1600 ASSERT(!paintsIntoCompositedAncestor()); |
1564 | 1601 |
1565 if (m_graphicsLayer && m_graphicsLayer->drawsContent()) { | 1602 if (m_graphicsLayer && m_graphicsLayer->drawsContent()) { |
(...skipping 14 matching lines...) Expand all Loading... | |
1580 layerDirtyRect.move(-m_backgroundLayer->offsetFromRenderer()); | 1617 layerDirtyRect.move(-m_backgroundLayer->offsetFromRenderer()); |
1581 m_backgroundLayer->setNeedsDisplayInRect(layerDirtyRect); | 1618 m_backgroundLayer->setNeedsDisplayInRect(layerDirtyRect); |
1582 } | 1619 } |
1583 | 1620 |
1584 if (m_maskLayer && m_maskLayer->drawsContent()) { | 1621 if (m_maskLayer && m_maskLayer->drawsContent()) { |
1585 IntRect layerDirtyRect = r; | 1622 IntRect layerDirtyRect = r; |
1586 layerDirtyRect.move(-m_maskLayer->offsetFromRenderer()); | 1623 layerDirtyRect.move(-m_maskLayer->offsetFromRenderer()); |
1587 m_maskLayer->setNeedsDisplayInRect(layerDirtyRect); | 1624 m_maskLayer->setNeedsDisplayInRect(layerDirtyRect); |
1588 } | 1625 } |
1589 | 1626 |
1627 if (m_borderRadiusLayer && m_borderRadiusLayer->drawsContent()) { | |
1628 IntRect layerDirtyRect = r; | |
1629 layerDirtyRect.move(-m_borderRadiusLayer->offsetFromRenderer()); | |
1630 m_borderRadiusLayer->setNeedsDisplayInRect(layerDirtyRect); | |
1631 } | |
1632 | |
1590 if (m_scrollingContentsLayer && m_scrollingContentsLayer->drawsContent()) { | 1633 if (m_scrollingContentsLayer && m_scrollingContentsLayer->drawsContent()) { |
1591 IntRect layerDirtyRect = r; | 1634 IntRect layerDirtyRect = r; |
1592 layerDirtyRect.move(-m_scrollingContentsLayer->offsetFromRenderer()); | 1635 layerDirtyRect.move(-m_scrollingContentsLayer->offsetFromRenderer()); |
1593 m_scrollingContentsLayer->setNeedsDisplayInRect(layerDirtyRect); | 1636 m_scrollingContentsLayer->setNeedsDisplayInRect(layerDirtyRect); |
1594 } | 1637 } |
1595 } | 1638 } |
1596 | 1639 |
1597 void RenderLayerBacking::paintIntoLayer(const GraphicsLayer* graphicsLayer, Grap hicsContext* context, | 1640 void RenderLayerBacking::paintIntoLayer(const GraphicsLayer* graphicsLayer, Grap hicsContext* context, |
1598 const IntRect& paintDirtyRect, // In the coords of rootLayer . | 1641 const IntRect& paintDirtyRect, // In the coords of rootLayer . |
1599 PaintBehavior paintBehavior, GraphicsLayerPaintingPhase pain tingPhase) | 1642 PaintBehavior paintBehavior, GraphicsLayerPaintingPhase pain tingPhase) |
1600 { | 1643 { |
1601 if (paintsIntoCompositedAncestor()) { | 1644 if (paintsIntoCompositedAncestor()) { |
1602 ASSERT_NOT_REACHED(); | 1645 ASSERT_NOT_REACHED(); |
1603 return; | 1646 return; |
1604 } | 1647 } |
1605 | 1648 |
1606 FontCachePurgePreventer fontCachePurgePreventer; | 1649 FontCachePurgePreventer fontCachePurgePreventer; |
1607 | 1650 |
1608 RenderLayer::PaintLayerFlags paintFlags = 0; | 1651 RenderLayer::PaintLayerFlags paintFlags = 0; |
1609 if (paintingPhase & GraphicsLayerPaintBackground) | 1652 if (paintingPhase & GraphicsLayerPaintBackground) |
1610 paintFlags |= RenderLayer::PaintLayerPaintingCompositingBackgroundPhase; | 1653 paintFlags |= RenderLayer::PaintLayerPaintingCompositingBackgroundPhase; |
1611 if (paintingPhase & GraphicsLayerPaintForeground) | 1654 if (paintingPhase & GraphicsLayerPaintForeground) |
1612 paintFlags |= RenderLayer::PaintLayerPaintingCompositingForegroundPhase; | 1655 paintFlags |= RenderLayer::PaintLayerPaintingCompositingForegroundPhase; |
1613 if (paintingPhase & GraphicsLayerPaintMask) | 1656 if (paintingPhase & GraphicsLayerPaintMask) |
1614 paintFlags |= RenderLayer::PaintLayerPaintingCompositingMaskPhase; | 1657 paintFlags |= RenderLayer::PaintLayerPaintingCompositingMaskPhase; |
1658 if (paintingPhase & GraphicsLayerPaintBorderRadiusMask) | |
1659 paintFlags |= RenderLayer::PaintLayerPaintingCompositingBorderRadiusMask Phase; | |
1615 if (paintingPhase & GraphicsLayerPaintOverflowContents) | 1660 if (paintingPhase & GraphicsLayerPaintOverflowContents) |
1616 paintFlags |= RenderLayer::PaintLayerPaintingOverflowContents; | 1661 paintFlags |= RenderLayer::PaintLayerPaintingOverflowContents; |
1617 if (paintingPhase & GraphicsLayerPaintCompositedScroll) | 1662 if (paintingPhase & GraphicsLayerPaintCompositedScroll) |
1618 paintFlags |= RenderLayer::PaintLayerPaintingCompositingScrollingPhase; | 1663 paintFlags |= RenderLayer::PaintLayerPaintingCompositingScrollingPhase; |
1619 | 1664 |
1620 if (graphicsLayer == m_backgroundLayer) | 1665 if (graphicsLayer == m_backgroundLayer) |
1621 paintFlags |= (RenderLayer::PaintLayerPaintingRootBackgroundOnly | Rende rLayer::PaintLayerPaintingCompositingForegroundPhase); // Need PaintLayerPaintin gCompositingForegroundPhase to walk child layers. | 1666 paintFlags |= (RenderLayer::PaintLayerPaintingRootBackgroundOnly | Rende rLayer::PaintLayerPaintingCompositingForegroundPhase); // Need PaintLayerPaintin gCompositingForegroundPhase to walk child layers. |
1622 else if (m_backgroundLayer) | 1667 else if (m_backgroundLayer) |
1623 paintFlags |= RenderLayer::PaintLayerPaintingSkipRootBackground; | 1668 paintFlags |= RenderLayer::PaintLayerPaintingSkipRootBackground; |
1624 | 1669 |
(...skipping 26 matching lines...) Expand all Loading... | |
1651 { | 1696 { |
1652 #ifndef NDEBUG | 1697 #ifndef NDEBUG |
1653 if (Page* page = renderer()->frame()->page()) | 1698 if (Page* page = renderer()->frame()->page()) |
1654 page->setIsPainting(true); | 1699 page->setIsPainting(true); |
1655 #endif | 1700 #endif |
1656 | 1701 |
1657 if (graphicsLayer == m_graphicsLayer.get() | 1702 if (graphicsLayer == m_graphicsLayer.get() |
1658 || graphicsLayer == m_foregroundLayer.get() | 1703 || graphicsLayer == m_foregroundLayer.get() |
1659 || graphicsLayer == m_backgroundLayer.get() | 1704 || graphicsLayer == m_backgroundLayer.get() |
1660 || graphicsLayer == m_maskLayer.get() | 1705 || graphicsLayer == m_maskLayer.get() |
1706 || graphicsLayer == m_borderRadiusLayer.get() | |
1661 || graphicsLayer == m_scrollingContentsLayer.get()) { | 1707 || graphicsLayer == m_scrollingContentsLayer.get()) { |
1662 InspectorInstrumentation::willPaint(renderer()); | 1708 InspectorInstrumentation::willPaint(renderer()); |
1663 | 1709 |
1664 // The dirtyRect is in the coords of the painting root. | 1710 // The dirtyRect is in the coords of the painting root. |
1665 IntRect dirtyRect = clip; | 1711 IntRect dirtyRect = clip; |
1666 if (!(paintingPhase & GraphicsLayerPaintOverflowContents)) | 1712 if (!(paintingPhase & GraphicsLayerPaintOverflowContents)) |
1667 dirtyRect.intersect(compositedBounds()); | 1713 dirtyRect.intersect(compositedBounds()); |
1668 | 1714 |
1669 // We have to use the same root as for hit testing, because both methods can compute and cache clipRects. | 1715 // We have to use the same root as for hit testing, because both methods can compute and cache clipRects. |
1670 paintIntoLayer(graphicsLayer, &context, dirtyRect, PaintBehaviorNormal, paintingPhase); | 1716 paintIntoLayer(graphicsLayer, &context, dirtyRect, PaintBehaviorNormal, paintingPhase); |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1928 double backingMemory; | 1974 double backingMemory; |
1929 | 1975 |
1930 // m_ancestorClippingLayer, m_contentsContainmentLayer and m_childContainmen tLayer are just used for masking or containment, so have no backing. | 1976 // m_ancestorClippingLayer, m_contentsContainmentLayer and m_childContainmen tLayer are just used for masking or containment, so have no backing. |
1931 backingMemory = m_graphicsLayer->backingStoreMemoryEstimate(); | 1977 backingMemory = m_graphicsLayer->backingStoreMemoryEstimate(); |
1932 if (m_foregroundLayer) | 1978 if (m_foregroundLayer) |
1933 backingMemory += m_foregroundLayer->backingStoreMemoryEstimate(); | 1979 backingMemory += m_foregroundLayer->backingStoreMemoryEstimate(); |
1934 if (m_backgroundLayer) | 1980 if (m_backgroundLayer) |
1935 backingMemory += m_backgroundLayer->backingStoreMemoryEstimate(); | 1981 backingMemory += m_backgroundLayer->backingStoreMemoryEstimate(); |
1936 if (m_maskLayer) | 1982 if (m_maskLayer) |
1937 backingMemory += m_maskLayer->backingStoreMemoryEstimate(); | 1983 backingMemory += m_maskLayer->backingStoreMemoryEstimate(); |
1984 if (m_borderRadiusLayer) | |
1985 backingMemory += m_borderRadiusLayer->backingStoreMemoryEstimate(); | |
1938 | 1986 |
1939 if (m_scrollingContentsLayer) | 1987 if (m_scrollingContentsLayer) |
1940 backingMemory += m_scrollingContentsLayer->backingStoreMemoryEstimate(); | 1988 backingMemory += m_scrollingContentsLayer->backingStoreMemoryEstimate(); |
1941 | 1989 |
1942 if (m_layerForHorizontalScrollbar) | 1990 if (m_layerForHorizontalScrollbar) |
1943 backingMemory += m_layerForHorizontalScrollbar->backingStoreMemoryEstima te(); | 1991 backingMemory += m_layerForHorizontalScrollbar->backingStoreMemoryEstima te(); |
1944 | 1992 |
1945 if (m_layerForVerticalScrollbar) | 1993 if (m_layerForVerticalScrollbar) |
1946 backingMemory += m_layerForVerticalScrollbar->backingStoreMemoryEstimate (); | 1994 backingMemory += m_layerForVerticalScrollbar->backingStoreMemoryEstimate (); |
1947 | 1995 |
1948 if (m_layerForScrollCorner) | 1996 if (m_layerForScrollCorner) |
1949 backingMemory += m_layerForScrollCorner->backingStoreMemoryEstimate(); | 1997 backingMemory += m_layerForScrollCorner->backingStoreMemoryEstimate(); |
1950 | 1998 |
1951 return backingMemory; | 1999 return backingMemory; |
1952 } | 2000 } |
1953 | 2001 |
1954 void RenderLayerBacking::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) c onst | 2002 void RenderLayerBacking::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) c onst |
1955 { | 2003 { |
1956 MemoryClassInfo info(memoryObjectInfo, this, PlatformMemoryTypes::Rendering) ; | 2004 MemoryClassInfo info(memoryObjectInfo, this, PlatformMemoryTypes::Rendering) ; |
1957 info.addWeakPointer(m_owningLayer); | 2005 info.addWeakPointer(m_owningLayer); |
1958 info.addMember(m_ancestorClippingLayer, "ancestorClippingLayer"); | 2006 info.addMember(m_ancestorClippingLayer, "ancestorClippingLayer"); |
1959 info.addMember(m_contentsContainmentLayer, "contentsContainmentLayer"); | 2007 info.addMember(m_contentsContainmentLayer, "contentsContainmentLayer"); |
1960 info.addMember(m_graphicsLayer, "graphicsLayer"); | 2008 info.addMember(m_graphicsLayer, "graphicsLayer"); |
1961 info.addMember(m_foregroundLayer, "foregroundLayer"); | 2009 info.addMember(m_foregroundLayer, "foregroundLayer"); |
1962 info.addMember(m_backgroundLayer, "backgroundLayer"); | 2010 info.addMember(m_backgroundLayer, "backgroundLayer"); |
1963 info.addMember(m_childContainmentLayer, "childContainmentLayer"); | 2011 info.addMember(m_childContainmentLayer, "childContainmentLayer"); |
1964 info.addMember(m_maskLayer, "maskLayer"); | 2012 info.addMember(m_maskLayer, "maskLayer"); |
2013 info.addMember(m_borderRadiusLayer, "borderRadiusLayer"); | |
1965 info.addMember(m_layerForHorizontalScrollbar, "layerForHorizontalScrollbar") ; | 2014 info.addMember(m_layerForHorizontalScrollbar, "layerForHorizontalScrollbar") ; |
1966 info.addMember(m_layerForVerticalScrollbar, "layerForVerticalScrollbar"); | 2015 info.addMember(m_layerForVerticalScrollbar, "layerForVerticalScrollbar"); |
1967 info.addMember(m_layerForScrollCorner, "layerForScrollCorner"); | 2016 info.addMember(m_layerForScrollCorner, "layerForScrollCorner"); |
1968 info.addMember(m_scrollingLayer, "scrollingLayer"); | 2017 info.addMember(m_scrollingLayer, "scrollingLayer"); |
1969 info.addMember(m_scrollingContentsLayer, "scrollingContentsLayer"); | 2018 info.addMember(m_scrollingContentsLayer, "scrollingContentsLayer"); |
1970 } | 2019 } |
1971 | 2020 |
1972 } // namespace WebCore | 2021 } // namespace WebCore |
OLD | NEW |