synchronizedPaint() causes painting when outside of BeginMainFrame |
||||||
Issue descriptionupdateAllLifecyclePhases now executes synchronizedPaint, but we actually call into updateAllLifecyclePhases for many reasons that are not related to producing a frame, ex. inside EventHandler.cpp, inside the CheckedPreferredSize machinery on Mac and WebView, and many other places. This means that we end up re-recording the skp's for the entire page potentially over and over again while events dispatch or other things happen in the page. I've seen this in a number of traces recently though I don't have one on hand.
,
Mar 2 2016
FYI paint should only be doing a non-trivial amount of work if paint is actually dirty during the frame. But I agree that call sites should only advance the lifecycle as far as their use case requires.
,
Mar 2 2016
Paint is almost always dirty though, if the page mutates the DOM and then dispatches an event, then mutates the DOM again, we record the skps twice.
,
Mar 2 2016
In such cases, yes. The whole lifecycle is dirty. I also agree that this bug is pretty easy to fix in the M51 timeframe.
,
Mar 2 2016
,
Apr 4 2016
Direct callers of FrameView::updateAllLifecyclePhases other than PageAnimator: 1. LocalFrame::nodeImage 2. LocalFrame::LocalFrame::dragImageForSelection 3. EventHandler::handleGestureTap 4. SVGImage::imagePicture 5. SVGImageChromeClient::animationTimerFired 6. InspectorOverlay::updateAllLifecyclePhases 7. WebAXObject::updateLayoutAndCheckValidity 8. ChromePrintContext::spoolSinglePage 9. ChromePrintContext::spoolAllPagesWithBoundaries
,
Apr 4 2016
Direct callers of PageWidgetDelegate::updateAllLifecyclePhases: Three WebWidget subclasses: WebViewImpl, WebPagePopupImpl, and WebFrameWidgetImpl. Direct callers of WebViewImpl::updateAllLifecyclePhases: 1. WebViewImpl::enableTapHighlights 2. WebViewImpl::resizeViewWhileAnchored 3. WebViewImpl::contentsPreferredMinimumSize 4. WebViewImpl::setBaseBackgroundColor Direct callers of WebFrameWidgetImpl::updateAllLifecyclePhases: 1. WebFrameWidgetImpl::setBaseBackgroundColor No callers of WebPagePopupImpl::updateAllLifecyclePhases. Callers of WebWidget::updateAllLifecyclePhases: 1. WebViewPlugin::updateAllLifecyclePhases 2. WebViewPlugin::updateGeometry 3. RenderWidget::UpdateVisualState
,
Apr 4 2016
The only call sites that really want paint are these: WebViewImpl::enableTapHighlights WebViewImpl::resizeViewWhileAnchored WebViewImpl::contentsPreferredMinimumSize WebViewImpl::setBaseBackgroundColor WebFrameWidgetImpl::setBaseBackgroundColor WebViewPlugin::updateAllLifecyclePhases WebViewPlugin::updateGeometry RenderWidget::UpdateVisualState The others probably just want FrameView::updateLifecycleToCompositingCleanPlusScrolling
,
Apr 5 2016
Why do these want to paint? WebViewImpl::enableTapHighlights WebViewImpl::resizeViewWhileAnchored WebViewImpl::contentsPreferredMinimumSize WebViewImpl::setBaseBackgroundColor WebFrameWidgetImpl::setBaseBackgroundColor WebViewPlugin::updateGeometry
,
Apr 9 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8a021f4923a66c50ed1a83fc0e1dc1b4d1add8a3 commit 8a021f4923a66c50ed1a83fc0e1dc1b4d1add8a3 Author: chrishtr <chrishtr@chromium.org> Date: Sat Apr 09 19:11:45 2016 Downgrade some lifecycle update calls to not include paint if not necessary. BUG= 591468 Review URL: https://codereview.chromium.org/1860273003 Cr-Commit-Position: refs/heads/master@{#386304} [modify] https://crrev.com/8a021f4923a66c50ed1a83fc0e1dc1b4d1add8a3/third_party/WebKit/Source/core/frame/LocalFrame.cpp [modify] https://crrev.com/8a021f4923a66c50ed1a83fc0e1dc1b4d1add8a3/third_party/WebKit/Source/core/input/EventHandler.cpp [modify] https://crrev.com/8a021f4923a66c50ed1a83fc0e1dc1b4d1add8a3/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp [modify] https://crrev.com/8a021f4923a66c50ed1a83fc0e1dc1b4d1add8a3/third_party/WebKit/Source/web/WebAXObject.cpp [modify] https://crrev.com/8a021f4923a66c50ed1a83fc0e1dc1b4d1add8a3/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp [modify] https://crrev.com/8a021f4923a66c50ed1a83fc0e1dc1b4d1add8a3/third_party/WebKit/Source/web/WebViewImpl.cpp
,
Apr 13 2016
And r386304 is causing bug 602961 . Fix? Revert?
,
Apr 13 2016
Thanks for the report. I'll look into bug 602961 today.
,
Apr 14 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f07d9b4a2ebb30cb77d3cca7d59e1f3c674e81eb commit f07d9b4a2ebb30cb77d3cca7d59e1f3c674e81eb Author: wangxianzhu <wangxianzhu@chromium.org> Date: Thu Apr 14 00:50:00 2016 Partly revert https://codereview.chromium.org/1860273003/ where paint follows Restored updateLifecycleToCompositingCleanPlusScrolling() to updateAllLifecyclePhases() where paint follows, because some paint code may depend on the result of lifecycle phases between CompositingUpdateClean and InPaint. For example, we update table collapsed borders and layer empty phase information during paint invalidtion, which are needed by paint. BUG= 602961 , 591468 , 603230 Review URL: https://codereview.chromium.org/1890603002 Cr-Commit-Position: refs/heads/master@{#387178} [modify] https://crrev.com/f07d9b4a2ebb30cb77d3cca7d59e1f3c674e81eb/third_party/WebKit/Source/core/frame/LocalFrame.cpp [modify] https://crrev.com/f07d9b4a2ebb30cb77d3cca7d59e1f3c674e81eb/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp [modify] https://crrev.com/f07d9b4a2ebb30cb77d3cca7d59e1f3c674e81eb/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
,
Apr 20 2016
Issue 603230 has been merged into this issue.
,
Apr 22 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/04e4faa37b382d13044fa6ceb41fc5308dbc8c2c commit 04e4faa37b382d13044fa6ceb41fc5308dbc8c2c Author: chrishtr <chrishtr@chromium.org> Date: Fri Apr 22 03:48:23 2016 Add FrameView::updateAllLifecyclePhasesExceptPaint and use it in a few cases. BUG= 591468 Review URL: https://codereview.chromium.org/1909033003 Cr-Commit-Position: refs/heads/master@{#389010} [modify] https://crrev.com/04e4faa37b382d13044fa6ceb41fc5308dbc8c2c/third_party/WebKit/Source/core/dom/DocumentLifecycle.cpp [modify] https://crrev.com/04e4faa37b382d13044fa6ceb41fc5308dbc8c2c/third_party/WebKit/Source/core/frame/FrameView.cpp [modify] https://crrev.com/04e4faa37b382d13044fa6ceb41fc5308dbc8c2c/third_party/WebKit/Source/core/frame/FrameView.h [modify] https://crrev.com/04e4faa37b382d13044fa6ceb41fc5308dbc8c2c/third_party/WebKit/Source/core/frame/LocalFrame.cpp [modify] https://crrev.com/04e4faa37b382d13044fa6ceb41fc5308dbc8c2c/third_party/WebKit/Source/core/paint/PaintControllerPaintTest.h [modify] https://crrev.com/04e4faa37b382d13044fa6ceb41fc5308dbc8c2c/third_party/WebKit/Source/core/paint/PaintLayerPainterTest.cpp [modify] https://crrev.com/04e4faa37b382d13044fa6ceb41fc5308dbc8c2c/third_party/WebKit/Source/core/paint/TableCellPainterTest.cpp [modify] https://crrev.com/04e4faa37b382d13044fa6ceb41fc5308dbc8c2c/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp [modify] https://crrev.com/04e4faa37b382d13044fa6ceb41fc5308dbc8c2c/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
,
Aug 2 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/eca522bb64cb9a44646a8d2749ec00b768d3490b commit eca522bb64cb9a44646a8d2749ec00b768d3490b Author: chrishtr <chrishtr@chromium.org> Date: Tue Aug 02 22:32:58 2016 Schedule animation when setting base background color, rather than forcing an update. Also, small cleanup to make FrameView::scheduleRelayoutOfSubtree match FrameView::scheduleRelayout. BUG= 591468 Review-Url: https://codereview.chromium.org/2194423002 Cr-Commit-Position: refs/heads/master@{#409352} [modify] https://crrev.com/eca522bb64cb9a44646a8d2749ec00b768d3490b/third_party/WebKit/Source/core/frame/FrameView.cpp [modify] https://crrev.com/eca522bb64cb9a44646a8d2749ec00b768d3490b/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp [modify] https://crrev.com/eca522bb64cb9a44646a8d2749ec00b768d3490b/third_party/WebKit/Source/web/WebViewImpl.cpp
,
Aug 11 2016
,
Aug 12 2016
,
Aug 12 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f66f629cc6107328e6a445d158e7a27fa91668df commit f66f629cc6107328e6a445d158e7a27fa91668df Author: chrishtr <chrishtr@chromium.org> Date: Fri Aug 12 21:59:21 2016 Remove apparently redundant uses of updatePageOverlays in WebViewImpl. BUG= 591468 Review-Url: https://codereview.chromium.org/2238343002 Cr-Commit-Position: refs/heads/master@{#411792} [modify] https://crrev.com/f66f629cc6107328e6a445d158e7a27fa91668df/third_party/WebKit/Source/web/WebViewImpl.cpp |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by chrishtr@chromium.org
, Mar 2 2016