RESOLVED FIXED162598
[GTK] Should check whether GDK can use GL before asking it to
https://bugs.webkit.org/show_bug.cgi?id=162598
Summary [GTK] Should check whether GDK can use GL before asking it to
Gustavo Noronha (kov)
Reported 2016-09-27 01:43:10 PDT
[GTK] Should check whether GDK can use GL before asking it to
Attachments
Patch (4.72 KB, patch)
2016-09-27 01:49 PDT, Gustavo Noronha (kov)
mcatanzaro: review+
Gustavo Noronha (kov)
Comment 1 2016-09-27 01:49:09 PDT
Michael Catanzaro
Comment 2 2016-09-27 01:56:13 PDT
Comment on attachment 289924 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=289924&action=review Thanks. OK with a GTK+ bug report on bugzilla.gnome.org. > Source/WebKit2/UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:79 > + g_warning("GDK is not able to create a GL context, falling back to glReadPixels: %s", error->message); I would tweak this slightly to indicate that glReadPixels is slow: "falling back to glReadPixels (slow!): %s" > Source/WebKit2/UIProcess/gtk/AcceleratedBackingStoreWayland.h:46 > + bool canGdkUseGL(); I think this function should probably be static, since it doesn't need any member variables. Otherwise, it should be const.
Carlos Garcia Campos
Comment 3 2016-09-27 02:01:35 PDT
Comment on attachment 289924 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=289924&action=review >> Source/WebKit2/UIProcess/gtk/AcceleratedBackingStoreWayland.h:46 >> + bool canGdkUseGL(); > > I think this function should probably be static, since it doesn't need any member variables. Otherwise, it should be const. And we avoid including gtk.h in the header.
Carlos Garcia Campos
Comment 4 2016-09-27 02:03:32 PDT
(In reply to comment #2) > Comment on attachment 289924 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=289924&action=review > > Thanks. OK with a GTK+ bug report on bugzilla.gnome.org. > > > Source/WebKit2/UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:79 > > + g_warning("GDK is not able to create a GL context, falling back to glReadPixels: %s", error->message); > > I would tweak this slightly to indicate that glReadPixels is slow: > > "falling back to glReadPixels (slow!): %s" I would not, first because it's not accurate, it's fast in most desktops, but also because there's nothing the user can do, I'm afraid. Or what's the reason why GL can't be used? missing libs the user needs to install? or drivers? > > Source/WebKit2/UIProcess/gtk/AcceleratedBackingStoreWayland.h:46 > > + bool canGdkUseGL(); > > I think this function should probably be static, since it doesn't need any > member variables. Otherwise, it should be const.
Gustavo Noronha (kov)
Comment 5 2016-09-27 02:09:05 PDT
Note You need to log in before you can comment on or make changes to this bug.