WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
CLOSED INVALID
55268
Optimization to prevent native control updates when HTML5 video control panel is completely transparent
https://bugs.webkit.org/show_bug.cgi?id=55268
Summary
Optimization to prevent native control updates when HTML5 video control panel...
Max Feil
Reported
2011-02-25 14:55:19 PST
Created
attachment 83882
[details]
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
Attachments
Patch based on svn revision 79683
(2.67 KB, patch)
2011-02-25 14:55 PST
,
Max Feil
eric
: review-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
WebKit Review Bot
Comment 1
2011-02-25 14:58:20 PST
Attachment 83882
[details]
did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/html/shadow/MediaControls.c..." exit_code: 1 Source/WebCore/html/shadow/MediaControls.cpp:201: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5] Source/WebCore/html/shadow/MediaControls.cpp:441: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5] Total errors found: 2 in 2 files If any of these errors are false positives, please file a bug against check-webkit-style.
Eric Seidel (no email)
Comment 2
2011-04-10 16:24:18 PDT
Comment on
attachment 83882
[details]
Patch based on svn revision 79683 Needs a ChangeLog (and tests!)
Max Feil
Comment 3
2012-11-02 12:28:21 PDT
This bug is invalid. See comments by Jer Noble in
bug 86769
for the reason.
Max Feil
Comment 4
2012-11-02 12:28:49 PDT
Closing invalid bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug