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

Unified Diff: third_party/WebKit/Source/web/WebViewImpl.cpp

Issue 1526093006: Fix paint code so that overlays and views paint their own layers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « third_party/WebKit/Source/web/InspectorOverlay.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/WebViewImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp
index a5687517f2e0daa9c972ba5539308f73ae1df632..9fa625f825559ef6dfad82a4ac345a68246d6139 100644
--- a/third_party/WebKit/Source/web/WebViewImpl.cpp
+++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
@@ -1998,17 +1998,23 @@ void WebViewImpl::updateAllLifecyclePhases()
if (!mainFrameImpl())
return;
- if (RuntimeEnabledFeatures::slimmingPaintSynchronizedPaintingEnabled())
- PageWidgetDelegate::updateLifecycleToCompositingCleanPlusScrolling(*m_page, *mainFrameImpl()->frame());
- else
- PageWidgetDelegate::updateAllLifecyclePhases(*m_page, *mainFrameImpl()->frame());
-
updateLayerTreeBackgroundColor();
- // TODO(wangxianzhu): Refactor overlay and link highlights updating and painting to make clearer
- // dependency between web/ and core/ in synchronized painting mode.
- if (InspectorOverlay* overlay = inspectorOverlay())
- overlay->layout();
+ PageWidgetDelegate::updateAllLifecyclePhases(*m_page, *mainFrameImpl()->frame());
+
+ if (RuntimeEnabledFeatures::slimmingPaintSynchronizedPaintingEnabled()) {
+ if (InspectorOverlay* overlay = inspectorOverlay()) {
+ overlay->updateAllLifecyclePhases();
+ // TODO(chrishtr): integrate paint into the overlay's lifecycle.
+ if (overlay->pageOverlay() && overlay->pageOverlay()->graphicsLayer())
+ overlay->pageOverlay()->graphicsLayer()->paint(nullptr);
+ }
+ if (m_pageColorOverlay)
+ m_pageColorOverlay->graphicsLayer()->paint(nullptr);
+ }
+
+ // TODO(chrishtr): link highlight's don't currently paint themselves, it's still driven by cc.
+ // Fix this.
for (size_t i = 0; i < m_linkHighlights.size(); ++i)
m_linkHighlights[i]->updateGeometry();
@@ -2032,10 +2038,6 @@ void WebViewImpl::updateAllLifecyclePhases()
client()->didMeaningfulLayout(WebMeaningfulLayout::FinishedLoading);
}
}
-
- // TODO(wangxianzhu): Avoid traversing frame tree for phases (style, layout, etc.) that we are sure no need to update.
- if (RuntimeEnabledFeatures::slimmingPaintSynchronizedPaintingEnabled())
- PageWidgetDelegate::updateAllLifecyclePhases(*m_page, *mainFrameImpl()->frame());
}
void WebViewImpl::paint(WebCanvas* canvas, const WebRect& rect)
« no previous file with comments | « third_party/WebKit/Source/web/InspectorOverlay.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698