Bug 168911 - [GTK] Flickering when leaving accelerated compositing mode
Summary: [GTK] Flickering when leaving accelerated compositing mode
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk
Depends on:
Blocks:
 
Reported: 2017-02-27 04:27 PST by Carlos Garcia Campos
Modified: 2017-02-27 06:40 PST (History)
1 user (show)

See Also:


Attachments
Patch (4.42 KB, patch)
2017-02-27 04:30 PST, Carlos Garcia Campos
no flags Details | Formatted Diff | Diff
New patch (2.87 KB, patch)
2017-02-27 06:24 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-02-27 04:27:31 PST
It doesn't always happen, and it too fast, more noticeable in website with a dark background, because we are drawing a single white fame. This happens when we leave AC mode and the threaded compositor is still rendering a frame. The render layer compositor already detached the root layer, so the threaded compositor doesn't actually render any of its layer (the backing store of all the layers has been destroyed at this point). However, CoordinatedGraphicsScene::paintToCurrentGLContext() always renders a white background when no web view color has been set. And that's the white frame we get. Rendering the web view background in CoordinatedGraphicsScene::paintToCurrentGLContext() is not needed at all, because the web view already takes care of rendering its background. So, we can simply remove the  m_viewBackgroundColor member from CoordinatedGraphicsScene because nobody is actually calling setViewBackgroundColor() and we never want to draw a white background either.
Comment 1 Carlos Garcia Campos 2017-02-27 04:30:00 PST
Created attachment 302837 [details]
Patch
Comment 2 Zan Dobersek 2017-02-27 04:44:58 PST
Comment on attachment 302837 [details]
Patch

Does this cause any change in behavior when loading pages in forced accelerated mode? E.g. the inital screen not being white?
Comment 3 Carlos Garcia Campos 2017-02-27 04:51:53 PST
(In reply to comment #2)
> Comment on attachment 302837 [details]
> Patch
> 
> Does this cause any change in behavior when loading pages in forced
> accelerated mode? E.g. the inital screen not being white?

No, the web view renders the white background.
Comment 4 Carlos Garcia Campos 2017-02-27 06:24:09 PST
Created attachment 302839 [details]
New patch

This is a simpler approach suggested by Zan, thanks!
Comment 5 Carlos Garcia Campos 2017-02-27 06:40:48 PST
Committed r213060: <http://trac.webkit.org/changeset/213060>