Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(132)

Unified Diff: Source/platform/graphics/GraphicsLayer.cpp

Issue 341213002: Redraw only dirty area for accelerated 2D Canvas. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/platform/graphics/GraphicsLayer.cpp
diff --git a/Source/platform/graphics/GraphicsLayer.cpp b/Source/platform/graphics/GraphicsLayer.cpp
index 6129a2e721fe347b557996cbb58f8afa24fb1ea7..57425c75fea223df716d22500f63841476e54c20 100644
--- a/Source/platform/graphics/GraphicsLayer.cpp
+++ b/Source/platform/graphics/GraphicsLayer.cpp
@@ -966,9 +966,14 @@ void GraphicsLayer::setIsRootForIsolatedGroup(bool isolated)
void GraphicsLayer::setContentsNeedsDisplay()
{
+ setContentsNeedsDisplayInRect(m_contentsRect);
+}
+
+void GraphicsLayer::setContentsNeedsDisplayInRect(const FloatRect& rect)
+{
if (WebLayer* contentsLayer = contentsLayerIfRegistered()) {
- contentsLayer->invalidate();
- addRepaintRect(m_contentsRect);
+ contentsLayer->invalidateRect(rect);
+ addRepaintRect(rect);
}
}

Powered by Google App Engine
This is Rietveld 408576698