Bug 206662 - [GTK] Reduce the maximum time we wait for draw events in DrawingMonitor
Summary: [GTK] Reduce the maximum time we wait for draw events in DrawingMonitor
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk
Depends on:
Blocks:
 
Reported: 2020-01-23 07:34 PST by Carlos Garcia Campos
Modified: 2020-01-24 00:48 PST (History)
10 users (show)

See Also:


Attachments
Patch (2.72 KB, patch)
2020-01-23 07:36 PST, Carlos Garcia Campos
clopez: 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 2020-01-23 07:34:55 PST
1 second is too much, we can wait up to 100_ms instead and wait for the next frame after 16_ms. We should also ensure there's a draw event since this is called from dispatchAfterEnsuringDrawing().
Comment 1 Carlos Garcia Campos 2020-01-23 07:36:46 PST
Created attachment 388541 [details]
Patch
Comment 2 Carlos Alberto Lopez Perez 2020-01-23 08:37:47 PST
Comment on attachment 388541 [details]
Patch

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

r=me

> Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp:413
> +    gtk_widget_queue_draw(m_webPage.viewWidget());

why this was not needed before?
Comment 3 Carlos Garcia Campos 2020-01-24 00:47:46 PST
Committed r255060: <https://trac.webkit.org/changeset/255060>
Comment 4 Carlos Garcia Campos 2020-01-24 00:48:55 PST
(In reply to Carlos Alberto Lopez Perez from comment #2)
> Comment on attachment 388541 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=388541&action=review
> 
> r=me
> 
> > Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp:413
> > +    gtk_widget_queue_draw(m_webPage.viewWidget());
> 
> why this was not needed before?

In some cases, like when there's an animation or after a force repaint, there's already a draw scheduled. When there wasn't we ended up waiting 1 second. Now we ensure a draw, like expected. It doesn't hurt if there was a draw already scheduled.