Bug 154147 - [GTK] Allow applications to disable Accelerated Compositing mode
Summary: [GTK] Allow applications to disable Accelerated Compositing mode
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Carlos Alberto Lopez Perez
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-11 18:32 PST by Carlos Alberto Lopez Perez
Modified: 2016-02-12 03:37 PST (History)
6 users (show)

See Also:


Attachments
Patch (1.38 KB, patch)
2016-02-11 18:37 PST, Carlos Alberto Lopez Perez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Alberto Lopez Perez 2016-02-11 18:32:05 PST
In bug 150558 we added the possibility to force AC to be always on if the environment variable WEBKIT_FORCE_COMPOSITING_MODE is defined.

Sometimes, because of bad graphics drivers or other grahpic related bugs (for example see bug 126122) it may be desirable to do the contrary thing: force AC to be off.

So I'm proposing here to add another variable, lets name it WEBKIT_DISABLE_COMPOSITING_MODE for consistency with the previous one to disable AC.
Comment 1 Carlos Alberto Lopez Perez 2016-02-11 18:37:32 PST
Created attachment 271115 [details]
Patch
Comment 2 Carlos Alberto Lopez Perez 2016-02-11 18:44:00 PST
(In reply to comment #0)
> So I'm proposing here to add another variable, lets name it
> WEBKIT_DISABLE_COMPOSITING_MODE for consistency with the previous one to
> disable AC.

I mean                            ^  for consistency with the previous one to force AC mode always on.
Comment 3 Carlos Garcia Campos 2016-02-11 22:39:04 PST
Comment on attachment 271115 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=271115&action=review

> Source/WebKit2/UIProcess/gtk/WebPreferencesGtk.cpp:50
> +    if (getenv("WEBKIT_DISABLE_COMPOSITING_MODE"))
> +        setAcceleratedCompositingEnabled(false);

Is this enough? We are enabling AC unconditionally in DrawingAreaImpl::setNativeSurfaceHandleForCompositing(), but only when m_layerTreeHost has been created. I guess we would never enter AC mode if the setting is disabled in first place.
Comment 4 Carlos Alberto Lopez Perez 2016-02-12 02:49:30 PST
(In reply to comment #3)
> Comment on attachment 271115 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=271115&action=review
> 
> > Source/WebKit2/UIProcess/gtk/WebPreferencesGtk.cpp:50
> > +    if (getenv("WEBKIT_DISABLE_COMPOSITING_MODE"))
> > +        setAcceleratedCompositingEnabled(false);
> 
> Is this enough? We are enabling AC unconditionally in
> DrawingAreaImpl::setNativeSurfaceHandleForCompositing(), but only when
> m_layerTreeHost has been created. I guess we would never enter AC mode if
> the setting is disabled in first place.

Yes, my tests indicate it is.

For example, if I load poster circle I see a 2D animation instead of the 3D tube.
Comment 5 WebKit Commit Bot 2016-02-12 03:37:33 PST
Comment on attachment 271115 [details]
Patch

Clearing flags on attachment: 271115

Committed r196467: <http://trac.webkit.org/changeset/196467>
Comment 6 WebKit Commit Bot 2016-02-12 03:37:35 PST
All reviewed patches have been landed.  Closing bug.