| 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 1603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1614 | 1614 |
| 1615 return m_graphicsLayer.get(); | 1615 return m_graphicsLayer.get(); |
| 1616 } | 1616 } |
| 1617 | 1617 |
| 1618 bool RenderLayerBacking::paintsIntoWindow() const | 1618 bool RenderLayerBacking::paintsIntoWindow() const |
| 1619 { | 1619 { |
| 1620 if (m_usingTiledCacheLayer) | 1620 if (m_usingTiledCacheLayer) |
| 1621 return false; | 1621 return false; |
| 1622 | 1622 |
| 1623 if (m_owningLayer->isRootLayer()) { | 1623 if (m_owningLayer->isRootLayer()) { |
| 1624 #if PLATFORM(BLACKBERRY) | |
| 1625 if (compositor()->inForcedCompositingMode()) | |
| 1626 return false; | |
| 1627 #endif | |
| 1628 | |
| 1629 return compositor()->rootLayerAttachment() != RenderLayerCompositor::Roo
tLayerAttachedViaEnclosingFrame; | 1624 return compositor()->rootLayerAttachment() != RenderLayerCompositor::Roo
tLayerAttachedViaEnclosingFrame; |
| 1630 } | 1625 } |
| 1631 | 1626 |
| 1632 return false; | 1627 return false; |
| 1633 } | 1628 } |
| 1634 | 1629 |
| 1635 void RenderLayerBacking::setRequiresOwnBackingStore(bool requiresOwnBacking) | 1630 void RenderLayerBacking::setRequiresOwnBackingStore(bool requiresOwnBacking) |
| 1636 { | 1631 { |
| 1637 if (requiresOwnBacking == m_requiresOwnBackingStore) | 1632 if (requiresOwnBacking == m_requiresOwnBackingStore) |
| 1638 return; | 1633 return; |
| (...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2118 | 2113 |
| 2119 if (m_layerForVerticalScrollbar) | 2114 if (m_layerForVerticalScrollbar) |
| 2120 backingMemory += m_layerForVerticalScrollbar->backingStoreMemoryEstimate
(); | 2115 backingMemory += m_layerForVerticalScrollbar->backingStoreMemoryEstimate
(); |
| 2121 | 2116 |
| 2122 if (m_layerForScrollCorner) | 2117 if (m_layerForScrollCorner) |
| 2123 backingMemory += m_layerForScrollCorner->backingStoreMemoryEstimate(); | 2118 backingMemory += m_layerForScrollCorner->backingStoreMemoryEstimate(); |
| 2124 | 2119 |
| 2125 return backingMemory; | 2120 return backingMemory; |
| 2126 } | 2121 } |
| 2127 | 2122 |
| 2128 #if PLATFORM(BLACKBERRY) | |
| 2129 bool RenderLayerBacking::contentsVisible(const GraphicsLayer*, const IntRect& lo
calContentRect) const | |
| 2130 { | |
| 2131 Frame* frame = renderer()->frame(); | |
| 2132 FrameView* view = frame ? frame->view() : 0; | |
| 2133 if (!view) | |
| 2134 return false; | |
| 2135 | |
| 2136 IntRect visibleContentRect(view->visibleContentRect()); | |
| 2137 FloatQuad absoluteContentQuad = renderer()->localToAbsoluteQuad(FloatRect(lo
calContentRect)); | |
| 2138 return absoluteContentQuad.enclosingBoundingBox().intersects(visibleContentR
ect); | |
| 2139 } | |
| 2140 #endif | |
| 2141 | |
| 2142 void RenderLayerBacking::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) c
onst | 2123 void RenderLayerBacking::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) c
onst |
| 2143 { | 2124 { |
| 2144 MemoryClassInfo info(memoryObjectInfo, this, PlatformMemoryTypes::Rendering)
; | 2125 MemoryClassInfo info(memoryObjectInfo, this, PlatformMemoryTypes::Rendering)
; |
| 2145 info.addWeakPointer(m_owningLayer); | 2126 info.addWeakPointer(m_owningLayer); |
| 2146 info.addMember(m_ancestorClippingLayer, "ancestorClippingLayer"); | 2127 info.addMember(m_ancestorClippingLayer, "ancestorClippingLayer"); |
| 2147 info.addMember(m_contentsContainmentLayer, "contentsContainmentLayer"); | 2128 info.addMember(m_contentsContainmentLayer, "contentsContainmentLayer"); |
| 2148 info.addMember(m_graphicsLayer, "graphicsLayer"); | 2129 info.addMember(m_graphicsLayer, "graphicsLayer"); |
| 2149 info.addMember(m_foregroundLayer, "foregroundLayer"); | 2130 info.addMember(m_foregroundLayer, "foregroundLayer"); |
| 2150 info.addMember(m_backgroundLayer, "backgroundLayer"); | 2131 info.addMember(m_backgroundLayer, "backgroundLayer"); |
| 2151 info.addMember(m_childContainmentLayer, "childContainmentLayer"); | 2132 info.addMember(m_childContainmentLayer, "childContainmentLayer"); |
| 2152 info.addMember(m_maskLayer, "maskLayer"); | 2133 info.addMember(m_maskLayer, "maskLayer"); |
| 2153 info.addMember(m_layerForHorizontalScrollbar, "layerForHorizontalScrollbar")
; | 2134 info.addMember(m_layerForHorizontalScrollbar, "layerForHorizontalScrollbar")
; |
| 2154 info.addMember(m_layerForVerticalScrollbar, "layerForVerticalScrollbar"); | 2135 info.addMember(m_layerForVerticalScrollbar, "layerForVerticalScrollbar"); |
| 2155 info.addMember(m_layerForScrollCorner, "layerForScrollCorner"); | 2136 info.addMember(m_layerForScrollCorner, "layerForScrollCorner"); |
| 2156 info.addMember(m_scrollingLayer, "scrollingLayer"); | 2137 info.addMember(m_scrollingLayer, "scrollingLayer"); |
| 2157 info.addMember(m_scrollingContentsLayer, "scrollingContentsLayer"); | 2138 info.addMember(m_scrollingContentsLayer, "scrollingContentsLayer"); |
| 2158 } | 2139 } |
| 2159 | 2140 |
| 2160 } // namespace WebCore | 2141 } // namespace WebCore |
| OLD | NEW |