Bug 214660

Summary: markContextChangedAndNotifyCanvasObserver and markContextChanged over-notify
Product: WebKit Reporter: Kenneth Russell <kbr>
Component: WebGLAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: dino, jdarpinian, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 126447, 126448, 212461    
Bug Blocks:    

Kenneth Russell
Reported 2020-07-22 15:07:52 PDT
WebGLRenderingContextBase::markContextChanged and WebGLRenderingContextBase::markContextChangedAndNotifyCanvasObserver dispatch too many notifications: - markContextChangedAndNotifyCanvasObserver doesn't take into account whether a user-level framebuffer is bound. If one is, then it shouldn't notify. - markContextChanged calls "htmlCanvas()->clearCopiedImage()" and "renderBox->contentChanged(CanvasPixelsChanged)" for every draw call - this seems expensive. dino@ indicated in discussion on Slack that with the addition of WebGLRenderingContextBase::prepareForDisplay in Bug 212461, at least some of these notifications can be done once per frame, at the end of the frame, rather than on each operation that might touch the WebGL back buffer.
Attachments
Kenneth Russell
Comment 1 2020-07-22 15:08:57 PDT
Noticed this while fixing Bug 126447 and Bug 126448.
Radar WebKit Bug Importer
Comment 2 2020-07-29 15:08:37 PDT
Note You need to log in before you can comment on or make changes to this bug.