Title: [255060] trunk/Source/WebKit
- Revision
- 255060
- Author
- [email protected]
- Date
- 2020-01-24 00:47:39 -0800 (Fri, 24 Jan 2020)
Log Message
[GTK] Reduce the maximum time we wait for draw events in DrawingMonitor
https://bugs.webkit.org/show_bug.cgi?id=206662
Reviewed by Carlos Alberto Lopez Perez.
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().
* UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp:
(WebKit::DrawingAreaProxyCoordinatedGraphics::DrawingMonitor::start):
(WebKit::DrawingAreaProxyCoordinatedGraphics::DrawingMonitor::didDraw):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (255059 => 255060)
--- trunk/Source/WebKit/ChangeLog 2020-01-24 08:37:08 UTC (rev 255059)
+++ trunk/Source/WebKit/ChangeLog 2020-01-24 08:47:39 UTC (rev 255060)
@@ -1,3 +1,17 @@
+2020-01-24 Carlos Garcia Campos <[email protected]>
+
+ [GTK] Reduce the maximum time we wait for draw events in DrawingMonitor
+ https://bugs.webkit.org/show_bug.cgi?id=206662
+
+ Reviewed by Carlos Alberto Lopez Perez.
+
+ 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().
+
+ * UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp:
+ (WebKit::DrawingAreaProxyCoordinatedGraphics::DrawingMonitor::start):
+ (WebKit::DrawingAreaProxyCoordinatedGraphics::DrawingMonitor::didDraw):
+
2020-01-24 youenn fablet <[email protected]>
Make sure fetch tasks go to network if service worker never gets to activated
Modified: trunk/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp (255059 => 255060)
--- trunk/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp 2020-01-24 08:37:08 UTC (rev 255059)
+++ trunk/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp 2020-01-24 08:47:39 UTC (rev 255060)
@@ -410,8 +410,9 @@
m_startTime = MonotonicTime::now();
m_callback = WTFMove(callback);
#if PLATFORM(GTK)
+ gtk_widget_queue_draw(m_webPage.viewWidget());
g_signal_connect_swapped(m_webPage.viewWidget(), "draw", reinterpret_cast<GCallback>(webViewDrawCallback), this);
- m_timer.startOneShot(1_s);
+ m_timer.startOneShot(100_ms);
#else
m_timer.startOneShot(0_s);
#endif
@@ -432,13 +433,13 @@
void DrawingAreaProxyCoordinatedGraphics::DrawingMonitor::didDraw()
{
- // We wait up to 1 second for draw events. If there are several draw events queued quickly,
+ // We wait up to 100 milliseconds for draw events. If there are several draw events queued quickly,
// we want to wait until all of them have been processed, so after receiving a draw, we wait
- // up to 100ms for the next one or stop.
- if (MonotonicTime::now() - m_startTime > 1_s)
+ // for the next frame or stop.
+ if (MonotonicTime::now() - m_startTime > 100_ms)
stop();
else
- m_timer.startOneShot(100_ms);
+ m_timer.startOneShot(16_ms);
}
void DrawingAreaProxyCoordinatedGraphics::dispatchAfterEnsuringDrawing(WTF::Function<void(CallbackBase::Error)>&& callbackFunction)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes