Bug 214660 - markContextChangedAndNotifyCanvasObserver and markContextChanged over-notify
Summary: markContextChangedAndNotifyCanvasObserver and markContextChanged over-notify
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on: 126447 126448 212461
Blocks:
  Show dependency treegraph
 
Reported: 2020-07-22 15:07 PDT by Kenneth Russell
Modified: 2020-07-29 15:08 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kenneth Russell 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.
Comment 1 Kenneth Russell 2020-07-22 15:08:57 PDT
Noticed this while fixing Bug 126447 and Bug 126448.
Comment 2 Radar WebKit Bug Importer 2020-07-29 15:08:37 PDT
<rdar://problem/66294753>