Index: Source/platform/graphics/GraphicsLayer.cpp |
diff --git a/Source/platform/graphics/GraphicsLayer.cpp b/Source/platform/graphics/GraphicsLayer.cpp |
index f2d1d39a71c7de19ea74612b701d63661e02eb29..ced35e76cd6599f96026ea78d2ef0963d360c365 100644 |
--- a/Source/platform/graphics/GraphicsLayer.cpp |
+++ b/Source/platform/graphics/GraphicsLayer.cpp |
@@ -890,11 +890,14 @@ void GraphicsLayer::setIsRootForIsolatedGroup(bool isolated) |
platformLayer()->setIsRootForIsolatedGroup(isolated); |
} |
-void GraphicsLayer::setContentsNeedsDisplay() |
+void GraphicsLayer::setContentsNeedsDisplay(const IntRect& dirtyRect) |
{ |
if (WebLayer* contentsLayer = contentsLayerIfRegistered()) { |
- contentsLayer->invalidate(); |
- addRepaintRect(m_contentsRect); |
+ IntRect rect = m_contentsRect; |
+ if (!dirtyRect.isEmpty()) |
+ rect = dirtyRect; |
+ contentsLayer->invalidateRect(rect); |
+ addRepaintRect(rect); |
} |
} |