Changeset 122354 in webkit
- Timestamp:
- Jul 11, 2012 12:29:30 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r122339 r122354 1 2012-07-11 Dean Jackson <dino@apple.com> 2 3 TileCache layers have wrong border debug color 4 https://bugs.webkit.org/show_bug.cgi?id=90922 5 6 Reviewed by Simon Fraser. 7 8 Make sure that the document background color is updated 9 when using a Tile Cache. 10 11 * compositing/document-background-color-expected.html: Added. 12 * compositing/document-background-color.html: Added. 13 1 14 2012-07-11 Allan Sandfeld Jensen <allan.jensen@nokia.com> 2 15 -
trunk/Source/WebCore/ChangeLog
r122353 r122354 1 2012-07-11 Dean Jackson <dino@apple.com> 2 3 TileCache layers have wrong border debug color 4 https://bugs.webkit.org/show_bug.cgi?id=90922 5 6 Reviewed by Simon Fraser. 7 8 Commit r122152 updated the layer hierarchy when a tile 9 cache is being used by the view. As part of that, GraphicsLayerClient::shouldUseTileCache() 10 was changed to return false in some situations (the idea was that it 11 should only be called from the createGraphicsLayer method). However 12 there were two other call points: one that sets the debug colors on 13 borders, the other was a call that keeps the document background in sync. 14 15 Add a new method usingTileCache() that returns the current state. Also fix 16 a FIXME where the debug code always called into the client rather than 17 caching the value on the GraphicsLayer. 18 19 Test: compositing/document-background-color.html 20 21 * platform/graphics/GraphicsLayer.cpp: 22 (WebCore::GraphicsLayer::GraphicsLayer): 23 (WebCore::GraphicsLayer::updateDebugIndicators): check the local variable when 24 setting the debug colors. 25 * platform/graphics/GraphicsLayer.h: 26 (GraphicsLayer): new bool member variable m_usingTileCache. 27 * platform/graphics/GraphicsLayerClient.h: 28 (WebCore::GraphicsLayerClient::usingTileCache): new virtual method to query if 29 this client is actually using the tile cache. 30 * platform/graphics/ca/GraphicsLayerCA.cpp: 31 (WebCore::GraphicsLayerCA::GraphicsLayerCA): set the member variable m_usingTileCache 32 if the GraphicsLayerClient says we are. 33 * rendering/RenderLayerBacking.h: 34 (WebCore::RenderLayerBacking::usingTileCache): 35 * rendering/RenderLayerCompositor.cpp: 36 (WebCore::RenderLayerCompositor::documentBackgroundColorDidChange): call usingTileCache() 37 rather than shouldUseTileCache(), because the latter's value might not always reflect 38 the existence of a cache. 39 1 40 2012-07-11 Ryosuke Niwa <rniwa@webkit.org> 2 41 -
trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp
r121461 r122354 80 80 , m_maintainsPixelAlignment(false) 81 81 , m_appliesPageScale(false) 82 , m_usingTileCache(false) 82 83 , m_paintingPhase(GraphicsLayerPaintAll) 83 84 , m_contentsOrientation(CompositingCoordinatesTopDown) … … 341 342 if (GraphicsLayer::showDebugBorders()) { 342 343 if (drawsContent()) { 343 // FIXME: It's weird to ask the client if this layer is a tile cache layer. 344 // Maybe we should just cache that information inside GraphicsLayer? 345 if (m_client->shouldUseTileCache(this)) // tile cache layer: dark blue 344 if (m_usingTileCache) // tile cache layer: dark blue 346 345 setDebugBorder(Color(0, 0, 128, 128), 0.5); 347 346 else if (m_usingTiledLayer) -
trunk/Source/WebCore/platform/graphics/GraphicsLayer.h
r121513 r122354 467 467 bool m_maintainsPixelAlignment : 1; 468 468 bool m_appliesPageScale : 1; // Set for the layer which has the page scale applied to it. 469 bool m_usingTileCache : 1; 469 470 470 471 GraphicsLayerPaintingPhase m_paintingPhase; -
trunk/Source/WebCore/platform/graphics/GraphicsLayerClient.h
r112178 r122354 57 57 58 58 virtual bool shouldUseTileCache(const GraphicsLayer*) const { return false; } 59 virtual bool usingTileCache(const GraphicsLayer*) const { return false; } 59 60 60 61 // Callback for when hardware-accelerated animation started. -
trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
r121524 r122354 269 269 { 270 270 PlatformCALayer::LayerType layerType = PlatformCALayer::LayerTypeWebLayer; 271 if (client && client->shouldUseTileCache(this)) 271 if (client && client->shouldUseTileCache(this)) { 272 272 layerType = PlatformCALayer::LayerTypeTileCacheLayer; 273 m_usingTileCache = true; 274 } 273 275 274 276 m_layer = PlatformCALayer::create(layerType, this); -
trunk/Source/WebCore/rendering/RenderLayerBacking.h
r122152 r122354 131 131 // GraphicsLayerClient interface 132 132 virtual bool shouldUseTileCache(const GraphicsLayer*) const; 133 virtual bool usingTileCache(const GraphicsLayer*) const { return m_usingTiledCacheLayer; } 133 134 virtual void notifyAnimationStarted(const GraphicsLayer*, double startTime); 134 135 virtual void notifySyncRequired(const GraphicsLayer*); -
trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp
r121926 r122354 1911 1911 1912 1912 GraphicsLayer* graphicsLayer = backing->graphicsLayer(); 1913 if (!graphicsLayer->client()-> shouldUseTileCache(graphicsLayer))1913 if (!graphicsLayer->client()->usingTileCache(graphicsLayer)) 1914 1914 return; 1915 1915
Note: See TracChangeset
for help on using the changeset viewer.