Summary: | Redundant rendering updates can be scheduled from inside Page::updateRendering() | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Simon Fraser (smfr) <simon.fraser> | ||||||||||||||||||
Component: | WebCore Misc. | Assignee: | Simon Fraser (smfr) <simon.fraser> | ||||||||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||||||||
Severity: | Normal | CC: | benjamin, cdumez, changseok, cmarcelo, darin, esprehn+autocc, ews-watchlist, fred.wang, glenn, gyuyoung.kim, Hironori.Fujii, jamesr, japhet, kangil.han, kondapallykalyan, luiz, nham, noam, pdr, rniwa, ryuan.choi, sabouhallawa, sergio, simon.fraser, thorton, tonikitoo, webkit-bug-importer, zeno | ||||||||||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||||||||||
Version: | Safari Technology Preview | ||||||||||||||||||||
Hardware: | Unspecified | ||||||||||||||||||||
OS: | Unspecified | ||||||||||||||||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=219447 | ||||||||||||||||||||
Bug Depends on: | 216958 | ||||||||||||||||||||
Bug Blocks: | 202843 | ||||||||||||||||||||
Attachments: |
|
Description
Simon Fraser (smfr)
2020-09-18 20:57:30 PDT
!! To fix this we'll need to have some state that tracks the current phase of the rendering update: enum RenderingUpdatePhase { Outside, UpdateRendering, Flushing, Painting }; A notifyFlushRequired during UpdateRendering just needs to ensure the flush happens. A paint invalidation during UpdateRendering or Flushing doesn't need to schedule another update. Created attachment 409863 [details]
EWSing
Comments on the approach welcome. It feels a little messy. Comment on attachment 409863 [details] EWSing View in context: https://bugs.webkit.org/attachment.cgi?id=409863&action=review I think this is a *fantastic* idea. I wish it could be understood in terms of "dirty bits" or "invalidation" rather than "phases", but regardless of the framework it’s something we really need. > Source/WebCore/dom/Document.cpp:8184 > + if (!domWindow()) > + return; > + > + if (auto* timelinesController = this->timelinesController()) Why not put both into local variables? (In reply to Darin Adler from comment #6) > Comment on attachment 409863 [details] > EWSing > > View in context: > https://bugs.webkit.org/attachment.cgi?id=409863&action=review > > I think this is a *fantastic* idea. I wish it could be understood in terms > of "dirty bits" or "invalidation" rather than "phases", but regardless of > the framework it’s something we really need. I think it's phases, not dirty bits, because it's order-dependent and dirty bits don't communicate that. > > Source/WebCore/dom/Document.cpp:8184 > > + if (!domWindow()) > > + return; > > + > > + if (auto* timelinesController = this->timelinesController()) > > Why not put both into local variables? Can do. Created attachment 410441 [details]
Patch
This patch uses bits for each step; I think I prefer it. Created attachment 410442 [details]
Patch
Created attachment 410453 [details]
Patch
Created attachment 410478 [details]
Patch
Comment on attachment 410478 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=410478&action=review > Source/WTF/wtf/text/TextStream.h:215 > +template<typename ItemType, size_t inlineCapacity = 0> No need for the "= 0" here. > Source/WebCore/dom/Document.cpp:8159 > + if (!domWindow()) > + return; > + > + if (auto* timelinesController = this->timelinesController()) > + timelinesController->updateAnimationsAndSendEvents(domWindow()->frozenNowTimestamp()); Same thought as before about putting both into local variables. > Source/WebCore/page/Page.cpp:1448 > + // FIXME: flags? I don’t understand this comment. Created attachment 410487 [details]
WK1 Testing
Created attachment 410665 [details]
Patch
Created attachment 410669 [details]
Patch
Comment on attachment 410669 [details]
Patch
This is wild.
Committed r268075: <https://trac.webkit.org/changeset/268075> All reviewed patches have been landed. Closing bug and clearing flags on attachment 410669 [details]. Filed: Bug 217490 – [WinCairo] ASSERTION FAILED: m_renderingUpdateRemainingSteps.last().isEmpty() in WebCore::Page::finalizeRenderingUpdate since r268075 |