Changeset 167529 in webkit
- Timestamp:
- Apr 18, 2014 10:31:39 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r167528 r167529 1 2014-04-18 Simon Fraser <simon.fraser@apple.com> 2 3 Contents of directly composited image layers are sometimes missing 4 https://bugs.webkit.org/show_bug.cgi?id=131880 5 6 Reviewed by Tim Horton. 7 8 Test that that shows the issue in Safari, but not in the test 9 runner because of timing issues, but maybe it will some day. 10 11 * compositing/images/update-content-rect-expected.html: Added. 12 * compositing/images/update-content-rect.html: Added. 13 1 14 2014-04-18 Commit Queue <commit-queue@webkit.org> 2 15 -
trunk/Source/WebCore/ChangeLog
r167528 r167529 1 2014-04-18 Simon Fraser <simon.fraser@apple.com> 2 3 Contents of directly composited image layers are sometimes missing 4 https://bugs.webkit.org/show_bug.cgi?id=131880 5 6 Reviewed by Tim Horton. 7 8 RenderLayerBacking::updateGraphicsLayerGeometry() tested whether a 9 GraphicsLayer had a contents layer to determine whether to call code 10 that updates the contents rect. However, on Mac, we don't make a contents 11 layer until later at layer flush time. That would result in an empty 12 contentsRect being set. 13 14 Fix by renaming GraphicsLayer::hasContentsLayer() to usesContentsLayer(), 15 and on Mac consulting the m_contentsLayerPurpose flag, which is set 16 at the appropriate time. 17 18 Test: compositing/images/update-content-rect.html 19 20 * platform/ScrollView.cpp: 21 (WebCore::positionScrollbarLayer): 22 * platform/graphics/GraphicsLayer.cpp: 23 (WebCore::GraphicsLayer::getDebugBorderInfo): 24 * platform/graphics/GraphicsLayer.h: 25 (WebCore::GraphicsLayer::usesContentsLayer): 26 (WebCore::GraphicsLayer::hasContentsLayer): Deleted. 27 * platform/graphics/ca/GraphicsLayerCA.h: 28 (WebCore::GraphicsLayerCA::hasContentsLayer): Deleted. 29 * platform/graphics/texmap/GraphicsLayerTextureMapper.h: 30 (WebCore::GraphicsLayerTextureMapper::usesContentsLayer): 31 (WebCore::GraphicsLayerTextureMapper::hasContentsLayer): Deleted. 32 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h: 33 * rendering/RenderLayerBacking.cpp: 34 (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): 35 (WebCore::RenderLayerBacking::positionOverflowControlsLayers): 36 (WebCore::RenderLayerBacking::compositingLayerType): 37 1 38 2014-04-18 Commit Queue <commit-queue@webkit.org> 2 39 -
trunk/Source/WebCore/platform/ScrollView.cpp
r167503 r167529 1050 1050 graphicsLayer->setSize(scrollbarRect.size()); 1051 1051 1052 if (graphicsLayer-> hasContentsLayer()) {1052 if (graphicsLayer->usesContentsLayer()) { 1053 1053 graphicsLayer->setContentsRect(IntRect(0, 0, scrollbarRect.width(), scrollbarRect.height())); 1054 1054 return; -
trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp
r167319 r167529 371 371 } 372 372 373 if ( hasContentsLayer()) {373 if (usesContentsLayer()) { 374 374 color = Color(255, 150, 255, 200); // non-painting layer with contents: pink 375 375 width = 2; -
trunk/Source/WebCore/platform/graphics/GraphicsLayer.h
r167472 r167529 409 409 // Should unify setContentsToMedia and setContentsToCanvas 410 410 virtual void setContentsToPlatformLayer(PlatformLayer* layer) { setContentsToMedia(layer); } 411 virtual bool hasContentsLayer() const { return false; }411 virtual bool usesContentsLayer() const { return false; } 412 412 413 413 // Callback from the underlying graphics system to draw layer contents. -
trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h
r167144 r167529 134 134 virtual void setContentsToSolidColor(const Color&); 135 135 136 virtual bool hasContentsLayer() const { return m_contentsLayer; }136 virtual bool usesContentsLayer() const override { return m_contentsLayerPurpose != NoContentsLayer; } 137 137 138 138 virtual void setShowDebugBorder(bool) override; -
trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.h
r166889 r167529 77 77 virtual void flushCompositingStateForThisLayerOnly(); 78 78 virtual void setName(const String& name); 79 virtual bool hasContentsLayer() const { return m_contentsLayer; }79 virtual bool usesContentsLayer() const { return m_contentsLayer; } 80 80 virtual PlatformLayer* platformLayer() const { return m_contentsLayer; } 81 81 -
trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h
r166784 r167529 110 110 virtual void suspendAnimations(double time) override; 111 111 virtual void resumeAnimations() override; 112 virtual bool hasContentsLayer() const override { return m_canvasPlatformLayer || m_compositedImage; }112 virtual bool usesContentsLayer() const override { return m_canvasPlatformLayer || m_compositedImage; } 113 113 114 114 void syncPendingStateChangesIncludingSubLayers(); -
trunk/Source/WebCore/rendering/RenderLayerBacking.cpp
r167472 r167529 988 988 bool didUpdateContentsRect = false; 989 989 updateDirectlyCompositedContents(isSimpleContainer, didUpdateContentsRect); 990 if (!didUpdateContentsRect && m_graphicsLayer-> hasContentsLayer())990 if (!didUpdateContentsRect && m_graphicsLayer->usesContentsLayer()) 991 991 resetContentsRect(); 992 992 … … 1276 1276 layer->setPosition(hBarRect.location() - offsetFromRenderer); 1277 1277 layer->setSize(hBarRect.size()); 1278 if (layer-> hasContentsLayer()) {1278 if (layer->usesContentsLayer()) { 1279 1279 IntRect barRect = IntRect(IntPoint(), hBarRect.size()); 1280 1280 layer->setContentsRect(barRect); 1281 1281 layer->setContentsClippingRect(barRect); 1282 1282 } 1283 layer->setDrawsContent(m_owningLayer.horizontalScrollbar() && !layer-> hasContentsLayer());1283 layer->setDrawsContent(m_owningLayer.horizontalScrollbar() && !layer->usesContentsLayer()); 1284 1284 } 1285 1285 … … 1288 1288 layer->setPosition(vBarRect.location() - offsetFromRenderer); 1289 1289 layer->setSize(vBarRect.size()); 1290 if (layer-> hasContentsLayer()) {1290 if (layer->usesContentsLayer()) { 1291 1291 IntRect barRect = IntRect(IntPoint(), vBarRect.size()); 1292 1292 layer->setContentsRect(barRect); 1293 1293 layer->setContentsClippingRect(barRect); 1294 1294 } 1295 layer->setDrawsContent(m_owningLayer.verticalScrollbar() && !layer-> hasContentsLayer());1295 layer->setDrawsContent(m_owningLayer.verticalScrollbar() && !layer->usesContentsLayer()); 1296 1296 } 1297 1297 … … 2581 2581 CompositingLayerType RenderLayerBacking::compositingLayerType() const 2582 2582 { 2583 if (m_graphicsLayer-> hasContentsLayer())2583 if (m_graphicsLayer->usesContentsLayer()) 2584 2584 return MediaCompositingLayer; 2585 2585
Note: See TracChangeset
for help on using the changeset viewer.