Bug 167496 - [Threaded Compositor] Stop creating the GLContext on demand the first time makeContextCurrent is called
Summary: [Threaded Compositor] Stop creating the GLContext on demand the first time ma...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-27 03:51 PST by Carlos Garcia Campos
Modified: 2017-01-27 04:12 PST (History)
1 user (show)

See Also:


Attachments
Patch (5.33 KB, patch)
2017-01-27 03:57 PST, Carlos Garcia Campos
zan: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2017-01-27 03:51:19 PST
This is causing problems with animations when entering AC mode on demand. What happens is that the threaded compositor is created, then the animation is scheduled and during the first animation iteration the GLContext is created, making the first frame of the animation quite slow. In my computer creating the GLContext takes 0.8 seconds. If the animation duration is less than the time it takes to create the GLContext, the animation ends without iterating. This causing timeouts in the bots in tests like animations/animation-iteration-event-destroy-renderer.html that expect webkitAnimationIteration events that never fire.
Comment 1 Carlos Garcia Campos 2017-01-27 03:57:19 PST
Created attachment 299926 [details]
Patch
Comment 2 Zan Dobersek 2017-01-27 04:07:41 PST
Comment on attachment 299926 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=299926&action=review

> Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:178
>      if (m_context)
>          return m_context->makeContextCurrent();

return m_context && m_context->makeContextCurrent();
Comment 3 Carlos Garcia Campos 2017-01-27 04:12:25 PST
Committed r211281: <http://trac.webkit.org/changeset/211281>