Title: [219158] trunk/Source/WebKit2
- Revision
- 219158
- Author
- [email protected]
- Date
- 2017-07-05 14:52:19 -0700 (Wed, 05 Jul 2017)
Log Message
Async Image Decoding: Image flashes away briefly when tapping on tab in iPad tab picker
https://bugs.webkit.org/show_bug.cgi?id=174173
<rdar://problem/32431952>
Reviewed by Geoffrey Garen.
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::addTransactionCallbackID):
When a client uses e.g. doAfterNextPresentationUpdate (or internally,
dispatchAfterEnsuringDrawing), they're doing so in the hopes that the
callback is called after the page is well-painted -- for example, to
remove a snapshot (in the tab picker case, as well as for navigation
gestures), or to *take* a snapshot. In all of these cases, it is
preferable to do a synchronous decode, to ensure that the image does
not flash away temporarily.
Use the existing mechanism that was implemented for the synchronous
activity state change flush to also force synchronous image decoding
any time there is a post-commit transaction callback.
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (219157 => 219158)
--- trunk/Source/WebKit2/ChangeLog 2017-07-05 21:40:31 UTC (rev 219157)
+++ trunk/Source/WebKit2/ChangeLog 2017-07-05 21:52:19 UTC (rev 219158)
@@ -1,3 +1,25 @@
+2017-07-05 Tim Horton <[email protected]>
+
+ Async Image Decoding: Image flashes away briefly when tapping on tab in iPad tab picker
+ https://bugs.webkit.org/show_bug.cgi?id=174173
+ <rdar://problem/32431952>
+
+ Reviewed by Geoffrey Garen.
+
+ * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
+ (WebKit::RemoteLayerTreeDrawingArea::addTransactionCallbackID):
+ When a client uses e.g. doAfterNextPresentationUpdate (or internally,
+ dispatchAfterEnsuringDrawing), they're doing so in the hopes that the
+ callback is called after the page is well-painted -- for example, to
+ remove a snapshot (in the tab picker case, as well as for navigation
+ gestures), or to *take* a snapshot. In all of these cases, it is
+ preferable to do a synchronous decode, to ensure that the image does
+ not flash away temporarily.
+
+ Use the existing mechanism that was implemented for the synchronous
+ activity state change flush to also force synchronous image decoding
+ any time there is a post-commit transaction callback.
+
2017-07-05 Wenson Hsieh <[email protected]>
[iOS DnD] [WK2] 3D touch fails to recognize when UIDragInteraction is enabled on phone
Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm (219157 => 219158)
--- trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm 2017-07-05 21:40:31 UTC (rev 219157)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm 2017-07-05 21:52:19 UTC (rev 219158)
@@ -497,6 +497,10 @@
void RemoteLayerTreeDrawingArea::addTransactionCallbackID(CallbackID callbackID)
{
+ // Assume that if someone is listening for this transaction's completion, that they want it to
+ // be a "complete" paint (including images that would normally be asynchronously decoding).
+ m_nextFlushIsForImmediatePaint = true;
+
m_pendingCallbackIDs.append(static_cast<RemoteLayerTreeTransaction::TransactionCallbackID>(callbackID));
scheduleCompositingLayerFlush();
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes