Bug 167195 - [GTK] Do not update the backing store state unnecessarily when page visibility changes
Summary: [GTK] Do not update the backing store state unnecessarily when page visibilit...
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-01-19 00:03 PST by Carlos Garcia Campos
Modified: 2017-01-19 01:01 PST (History)
3 users (show)

See Also:


Attachments
Patch (2.62 KB, patch)
2017-01-19 00:06 PST, Carlos Garcia Campos
svillar: 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-01-19 00:03:05 PST
I've noticed that we are receiving UpdateBackingStoreState messages in the web process even when size and scale factor didn't change. That's quite unfortunate because we do a lot of work unnecessarily and we tell the threaded compositor that the size changed. This is not only a problem because it's not rue, but also because changing the size is a sync operation in the threade compositor, so we block the compositing thread for nothing. This is happening because the WebPageProxy notifies the drawing area that the backing store is discardable when the page is not visible, and that always produces a new backing store state. In accelerating compositing mode we don't even have a backing store to discard, so we should check we have something to discard and also make sure we only generate a new backing store state if we really discarded the backing store.
Comment 1 Carlos Garcia Campos 2017-01-19 00:06:10 PST
Created attachment 299237 [details]
Patch
Comment 2 Sergio Villar Senin 2017-01-19 00:33:13 PST
Well, perhaps I was too fast. Are we sure that the call to backingStoreStateDidChange(DoNotRespondImmediately); does not have side effects for other platforms?. It might be the case that they don't perform heavy operations but have to do somethin.
Comment 3 Carlos Garcia Campos 2017-01-19 00:45:37 PST
(In reply to comment #2)
> Well, perhaps I was too fast. Are we sure that the call to
> backingStoreStateDidChange(DoNotRespondImmediately); does not have side
> effects for other platforms?. It might be the case that they don't perform
> heavy operations but have to do somethin.

I'm sure, because DrawingAreaProxyImpl is only used by GTK+ port :-)
Comment 4 Carlos Garcia Campos 2017-01-19 01:01:03 PST
Committed r210920: <http://trac.webkit.org/changeset/210920>