WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
211482
Re-enable 'OutsideViewport' rAF throttling
https://bugs.webkit.org/show_bug.cgi?id=211482
Summary
Re-enable 'OutsideViewport' rAF throttling
Said Abou-Hallawa
Reported
2020-05-05 19:36:42 PDT
The OutsideViewport throttling was not implemented in
r261113
. It has been disabled since
r242624
because the RenderingUpdate is currently serving the rAF callbacks with its speed regardless the rAF is throttled or not. The goal of the OutsideViewport throttling to save power by stoping calling the rAF callbacks of any <iframe> which is outside the viewport.
Attachments
Patch
(6.54 KB, patch)
2020-05-05 19:45 PDT
,
Said Abou-Hallawa
no flags
Details
Formatted Diff
Diff
Patch
(12.99 KB, patch)
2020-05-06 15:45 PDT
,
Said Abou-Hallawa
no flags
Details
Formatted Diff
Diff
Patch
(13.79 KB, patch)
2020-05-06 19:12 PDT
,
Said Abou-Hallawa
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Said Abou-Hallawa
Comment 1
2020-05-05 19:45:18 PDT
Created
attachment 398578
[details]
Patch
Radar WebKit Bug Importer
Comment 2
2020-05-06 10:54:05 PDT
<
rdar://problem/62937165
>
Said Abou-Hallawa
Comment 3
2020-05-06 11:21:30 PDT
These two tests fail consistently with this patch. webgl/2.0.0/conformance/canvas/rapid-resizing.html webgl/2.0.0/conformance2/rendering/canvas-resizing-with-pbo-bound.html These conformance tests are run by putting the test itself inside an <iframe> element. The script of the test relies on calling requestAnimationFrame() multiple times. The problem is the <iframe> in these tests are outside the viewport of the test window (800x600). Because the patch throttles the OutsideViewport rAF for 10 seconds, the rAF callback is called only every 10 seconds. And this is why they time out.
Said Abou-Hallawa
Comment 4
2020-05-06 13:30:15 PDT
Possible solutions: 1. Add an internal setting to enable the 'OutsideViewport' rAF throttling. This setting will be on by default but it will be disabled for DRT and WTR. The new test which is attache here will enable it through Internals.setOutsideViewportThrottlingEnabled(). 2. Throttle rAF only for 3rd party <iframe> which is will be cross origin. But do not throttle rAF for 1st party <iframe> which will be same origin. 3. Adjust these tests to show the <iframe> even if partially.
Said Abou-Hallawa
Comment 5
2020-05-06 15:45:22 PDT
Created
attachment 398675
[details]
Patch
Said Abou-Hallawa
Comment 6
2020-05-06 19:12:21 PDT
Created
attachment 398697
[details]
Patch
Simon Fraser (smfr)
Comment 7
2020-05-07 10:23:20 PDT
(In reply to Said Abou-Hallawa from
comment #4
)
> Possible solutions: > > 1. Add an internal setting to enable the 'OutsideViewport' rAF throttling. > This setting will be on by default but it will be disabled for DRT and WTR. > The new test which is attache here will enable it through > Internals.setOutsideViewportThrottlingEnabled().
This one.
Said Abou-Hallawa
Comment 8
2020-05-07 21:03:26 PDT
(In reply to Simon Fraser (smfr) from
comment #7
)
> (In reply to Said Abou-Hallawa from
comment #4
) > > Possible solutions: > > > > 1. Add an internal setting to enable the 'OutsideViewport' rAF throttling. > > This setting will be on by default but it will be disabled for DRT and WTR. > > The new test which is attache here will enable it through > > Internals.setOutsideViewportThrottlingEnabled(). > > This one.
It is implemented in the attached patch.
EWS
Comment 9
2020-05-13 16:28:39 PDT
Committed
r261663
: <
https://trac.webkit.org/changeset/261663
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 398697
[details]
.
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