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

Unified Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 1393083003: Implement interest rects for synchronized paint. (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/core/frame/FrameView.cpp
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
index abb627ea2e9225dea5c999b9a37b733cd1791744..16824b6285e30a14f89ffa599081cc40a1285f76 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -2471,11 +2471,18 @@ void FrameView::synchronizedPaint(const LayoutRect& interestRect)
void FrameView::synchronizedPaintRecursively(GraphicsLayer* graphicsLayer, const LayoutRect& interestRect)
{
- if (graphicsLayer->needsDisplay()) {
- // TODO(chrishtr): implement interest rects.
- GraphicsContext context(graphicsLayer->displayItemList());
- graphicsLayer->paint(context, roundedIntRect(interestRect));
+ GraphicsContext context(graphicsLayer->displayItemList());
+ // TODO(chrishtr): fix unit tests to not inject one-off interest rects.
+ if (IntRect(interestRect) != LayoutRect::infiniteIntRect()) {
+ if (graphicsLayer->needsDisplay()) {
+ graphicsLayer->paint(context, roundedIntRect(interestRect));
+
+ if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled())
+ graphicsLayer->commitIfNeeded();
+ }
+ } else {
+ graphicsLayer->paintIfNeeded(context);
if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled())
graphicsLayer->commitIfNeeded();
}

Powered by Google App Engine
This is Rietveld 408576698