[Webkit-unassigned] [Bug 55268] New: Optimization to prevent native control updates when HTML5 video control panel is completely transparent

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Feb 25 14:55:19 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=55268

           Summary: Optimization to prevent native control updates when
                    HTML5 video control panel is completely transparent
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
               URL: http://diveintohtml5.org/video.html
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: HTML DOM
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: mfeil at qnx.com



Max Feil <mfeil at qnx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #83882|                            |review?, commit-queue?
               Flag|                            |


Created an attachment (id=83882)
 --> (https://bugs.webkit.org/attachment.cgi?id=83882&action=review)
Patch based on svn revision 79683

The MediaControls::update() method may be called repeatedly while an HTML5 video is playing and the controls are completely transparent. This results in unnecessary processing which can take quite a bit of CPU on some platforms, including re-layout and re-rendering large tiles.

This fairly simple patch addresses this by checking for opacity values of 0 and not updating controls in this case. It also ensures that the controls are updated before they fade in again.

Note that the m_timeUpdateTimer may still be updating some of the controls (timeline, time numbers). In the port of WebKit I am working on we have disabled this timer because the MediaControls::update() method gets called consistently when the media time changes. I tested the trunk svn revision 79683 linux GTK+ build and when HTML5 video plays the MediaControls::update() method gets called repeatedly for a while after the page is loaded, but then these calls stop and the timeUpdateTimer is all that is updating controls.

This patch could also be extended to include an opacity check in MediaControls::timeUpdateTimerFired(), but I did not do this because it's beyond the scope of our port and would not get tested very well.

An example HTML5 video with native controls is near the bottom of the following page: http://diveintohtml5.org/video.html

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list