Changeset 106385 in webkit
- Timestamp:
- Jan 31, 2012 1:31:17 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r106384 r106385 1 2012-01-31 Anders Carlsson <andersca@apple.com> 2 3 Inform the tile cache whenever the visible rect changes 4 https://bugs.webkit.org/show_bug.cgi?id=77470 5 6 Reviewed by Andreas Kling. 7 8 * platform/graphics/GraphicsLayer.h: 9 (WebCore::GraphicsLayer::visibleRectChanged): 10 Add empty function. 11 12 * platform/graphics/ca/GraphicsLayerCA.cpp: 13 (WebCore::GraphicsLayerCA::visibleRectChanged): 14 Call through to the PlatformCALayer. 15 16 * platform/graphics/ca/mac/PlatformCALayerMac.mm: 17 (PlatformCALayer::visibleRectChanged): 18 Call through to the underlying WebTileCacheLayer. 19 20 * platform/graphics/ca/mac/TileCache.mm: 21 (WebCore::TileCache::visibleRectChanged): 22 Add empty stub. 23 24 (WebCore::TileCache::visibleRect): 25 Add new (currently unused) helper function that returns the visible rect of the 26 tile cache layer. 27 28 * platform/graphics/ca/mac/WebTileCacheLayer.h: 29 * platform/graphics/ca/mac/WebTileCacheLayer.mm: 30 (-[WebTileCacheLayer visibleRectChanged]): 31 Call through to the TielCache object. 32 33 * platform/graphics/ca/win/PlatformCALayerWin.cpp: 34 (PlatformCALayer::visibleRectChanged): 35 Add stub. 36 37 * rendering/RenderLayerCompositor.cpp: 38 (WebCore::RenderLayerCompositor::frameViewDidScroll): 39 Call GraphicsLayer::visibleRectChanged. 40 1 41 2012-01-31 Antti Koivisto <antti@apple.com> 2 42 -
trunk/Source/WebCore/platform/graphics/GraphicsLayer.h
r106190 r106385 409 409 bool usingTiledLayer() const { return m_usingTiledLayer; } 410 410 411 // Called whenever the visible rect of the given GraphicsLayer changed. 412 virtual void visibleRectChanged() { } 413 411 414 #if PLATFORM(QT) || PLATFORM(GTK) 412 415 // This allows several alternative GraphicsLayer implementations in the same port, -
trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
r106190 r106385 844 844 } 845 845 846 void GraphicsLayerCA::visibleRectChanged() 847 { 848 m_layer->visibleRectChanged(); 849 } 850 846 851 void GraphicsLayerCA::recursiveCommitChanges(const TransformState& state, float pageScaleFactor, const FloatPoint& positionRelativeToBase, bool affectedByPageScale) 847 852 { -
trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h
r106190 r106385 134 134 virtual void syncCompositingState(const FloatRect&); 135 135 virtual void syncCompositingStateForThisLayerOnly(); 136 137 virtual void visibleRectChanged() OVERRIDE; 136 138 137 139 bool allowTiledLayer() const { return m_allowTiledLayer; } -
trunk/Source/WebCore/platform/graphics/ca/PlatformCALayer.h
r103148 r106385 204 204 void setContentsScale(float); 205 205 206 void visibleRectChanged(); 207 206 208 #if PLATFORM(WIN) 207 209 HashMap<String, RefPtr<PlatformCAAnimation> >& animations() { return m_animations; } -
trunk/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm
r105576 r106385 957 957 } 958 958 959 void PlatformCALayer::visibleRectChanged() 960 { 961 if (m_layerType != LayerTypeTileCacheLayer) 962 return; 963 964 WebTileCacheLayer *tileCacheLayer = static_cast<WebTileCacheLayer *>(m_layer.get()); 965 [tileCacheLayer visibleRectChanged]; 966 } 967 959 968 #if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) 960 969 void PlatformCALayer::synchronouslyDisplayTilesInRect(const FloatRect& rect) -
trunk/Source/WebCore/platform/graphics/ca/mac/TileCache.h
r106311 r106385 38 38 namespace WebCore { 39 39 40 class FloatRect; 40 41 class IntPoint; 41 42 class IntRect; … … 57 58 58 59 CALayer *tileContainerLayer() const { return m_tileContainerLayer.get(); } 60 void visibleRectChanged(); 59 61 60 62 float tileDebugBorderWidth() const { return m_tileDebugBorderWidth; } … … 66 68 private: 67 69 TileCache(WebTileCacheLayer*, const IntSize& tileSize); 70 71 FloatRect visibleRect() const; 68 72 69 73 IntRect bounds() const; -
trunk/Source/WebCore/platform/graphics/ca/mac/TileCache.mm
r106311 r106385 166 166 } 167 167 168 void TileCache::visibleRectChanged() 169 { 170 // FIXME: Implement. 171 } 172 168 173 void TileCache::setTileDebugBorderWidth(float borderWidth) 169 174 { … … 184 189 for (WebTileLayer* tileLayer in [m_tileContainerLayer.get() sublayers]) 185 190 [tileLayer setBorderColor:m_tileDebugBorderColor.get()]; 191 } 192 193 FloatRect TileCache::visibleRect() const 194 { 195 CGRect rect = [m_tileCacheLayer bounds]; 196 197 CALayer *layer = m_tileCacheLayer; 198 CALayer *superlayer = [layer superlayer]; 199 200 while (superlayer) { 201 CGRect rectInSuperlayerCoordinates = [superlayer convertRect:rect fromLayer:layer]; 202 203 if ([superlayer masksToBounds]) 204 rect = CGRectIntersection([superlayer bounds], rectInSuperlayerCoordinates); 205 else 206 rect = rectInSuperlayerCoordinates; 207 208 layer = superlayer; 209 superlayer = [layer superlayer]; 210 } 211 212 return [m_tileCacheLayer convertRect:rect fromLayer:layer]; 186 213 } 187 214 -
trunk/Source/WebCore/platform/graphics/ca/mac/WebTileCacheLayer.h
r106304 r106385 36 36 37 37 - (CALayer *)tileContainerLayer; 38 - (void)visibleRectChanged; 38 39 39 40 @end -
trunk/Source/WebCore/platform/graphics/ca/mac/WebTileCacheLayer.mm
r106304 r106385 78 78 } 79 79 80 - (void)visibleRectChanged 81 { 82 _tileCache->visibleRectChanged(); 83 } 84 80 85 - (CGColorRef)borderColor 81 86 { -
trunk/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWin.cpp
r95901 r106385 621 621 } 622 622 623 void PlatformCALayer::visibleRectChanged() 624 { 625 } 626 623 627 #ifndef NDEBUG 624 628 static void printIndent(int indent) -
trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp
r106319 r106385 985 985 LayoutPoint scrollPosition = frameView->scrollPosition(); 986 986 987 if (RenderLayerBacking* backing = rootRenderLayer()->backing()) 988 backing->graphicsLayer()->visibleRectChanged(); 989 987 990 if (m_scrollLayer) 988 991 m_scrollLayer->setPosition(FloatPoint(-scrollPosition.x(), -scrollPosition.y()));
Note: See TracChangeset
for help on using the changeset viewer.