Summary: | [GTK] Graphics corruption when entering/leaving AC mode quickly | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Mario Sanchez Prada <mario> | ||||||||
Component: | WebKitGTK | Assignee: | Nobody <webkit-unassigned> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | berto, bugs-noreply, cgarcia, commit-queue, cosimoc, gustavo, mcatanzaro, mrobinson | ||||||||
Priority: | P2 | Keywords: | Gtk | ||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Linux | ||||||||||
Attachments: |
|
Description
Mario Sanchez Prada
2015-10-19 03:52:59 PDT
Created attachment 263476 [details]
Patch
The ExitAcceleratedCompositingMode message that the web process sends to the UI process, includes a backing store update to avoid this flickering. The DrawingArea first calls exitAcceleratedCompositingMode() and then incorporateUpdate() to render the given update. Since we are resizing the redirected window immediately to clear its resources, it's happening before the incorporateUpdate(). So, the same way we wait for 2 seconds to discard the non AC backing store, we can do the same with the redirected window. This ensure that when the window is resized, the new update has already rendered and also that switching quickly between AC and non Ac mode doesn't resize the redirected window unnecessarily. Hopefully this removes the flickering and rendering artifacts.
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API While I believe this patch made the reduced test case attached to fail less often, I've tested in the machine where I originally found the issue and the problem is still there. So, it's possible that this is a race condition depending on how fast the machine is, or just that this patch did not really fix the issue and I'm just a victim of a placebo effect :) (In reply to comment #3) > While I believe this patch made the reduced test case attached to fail less > often, I've tested in the machine where I originally found the issue and the > problem is still there. > > So, it's possible that this is a race condition depending on how fast the > machine is, or just that this patch did not really fix the issue and I'm > just a victim of a placebo effect :) I think the patch fixes half of the problem, the flickering when leaving AC mode, but not the one when entering. I'll submit a new patch to hopefully fix the other half too. Created attachment 263558 [details]
Updated patch
Try to fix the other half of the problem :-)
Comment on attachment 263558 [details] Updated patch View in context: https://bugs.webkit.org/attachment.cgi?id=263558&action=review I've tried this patch locally and I can confirm it fixes all the glitches I could see so far, not only with the provided test case but also with the original problem that prompted me to report the issue. I've also reviewed and it looks good to me, I only have a suggestion related to code readability, but overall I think this is good to land. Thanks Carlos! > Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBasePrivate.h:75 > +void webkitWebViewBaseWillEnterAcceleratedCompositingMode(WebKitWebViewBase*); I think I'd declare this method before webkitWebViewBaseEnterAcceleratedCompositingMode(), so that it's clear that these 3 callbacks are normally executed in that order. Committed r191340: <http://trac.webkit.org/changeset/191340> |