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

Unified Diff: third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp

Issue 1416053003: Let synchronized painting generate correct paint invalidation rects (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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: third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp b/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp
index e6c10a9539fe3bb8b396b26f212a0bcb1c8449f6..2d0ae56f58211ee11e2242067438d118d8f964c1 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp
+++ b/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp
@@ -112,18 +112,16 @@ void PaintController::endScope()
endSkippingCache();
}
-void PaintController::invalidate(const DisplayItemClientWrapper& client, PaintInvalidationReason paintInvalidationReason, const IntRect& previousPaintInvalidationRect, const IntRect& newPaintInvalidationRect)
+void PaintController::invalidate(const DisplayItemClientWrapper& client, PaintInvalidationReason paintInvalidationReason, const Vector<IntRect>& paintInvalidationRects)
{
invalidateClient(client);
- if (RuntimeEnabledFeatures::slimmingPaintSynchronizedPaintingEnabled()) {
- Invalidation invalidation = { previousPaintInvalidationRect, paintInvalidationReason };
- if (!previousPaintInvalidationRect.isEmpty())
- m_invalidations.append(invalidation);
- if (newPaintInvalidationRect != previousPaintInvalidationRect && !newPaintInvalidationRect.isEmpty()) {
- invalidation.rect = newPaintInvalidationRect;
- m_invalidations.append(invalidation);
- }
+ if (!RuntimeEnabledFeatures::slimmingPaintSynchronizedPaintingEnabled())
+ return;
+
+ for (auto& rect : paintInvalidationRects) {
+ Invalidation invalidation = { rect, paintInvalidationReason };
+ m_invalidations.append(invalidation);
}
}

Powered by Google App Engine
This is Rietveld 408576698