Bug 193903 - [GTK] gdk_cairo_draw_from_gl() in AcceleratedBackingStoreWayland fails in GtkInspector's magnifier
Summary: [GTK] gdk_cairo_draw_from_gl() in AcceleratedBackingStoreWayland fails in Gtk...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 192523
  Show dependency treegraph
 
Reported: 2019-01-28 05:50 PST by Alexander Mikhaylenko
Modified: 2019-02-05 08:03 PST (History)
8 users (show)

See Also:


Attachments
WebkitWebView in magnifier (70.42 KB, image/png)
2019-01-28 05:50 PST, Alexander Mikhaylenko
no flags Details
Patch (16.67 KB, patch)
2019-01-30 06:02 PST, Carlos Garcia Campos
mcatanzaro: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Mikhaylenko 2019-01-28 05:50:05 PST
Created attachment 360336 [details]
WebkitWebView in magnifier

AcceleratedBackingStoreWayland uses gdk_cairo_draw_from_gl() for drawing on GTK+ 3.16.0+. For some reason, in GtkInspector's magnifier or when drawing into a non-default Cairo surface, it doesn't draw anything and generates GL_INVALID_OPERATION (when I manually add glGetError() checks, by default it doesn't print anything.

See attached screenshot

Fedora 29, Intel GPU, Wayland, org.gnome.Platform//master in Flatpak.
Comment 1 Alexander Mikhaylenko 2019-01-28 08:13:06 PST
Forgot to mention that it specifically only happens with the GTK 3.16.0+ codepath which is a single call to gdk_cairo_draw_from_gl(). If I comment out that part to let it use the custom pipeline, it works just fine.
Comment 2 Carlos Garcia Campos 2019-01-30 06:02:44 PST
Created attachment 360573 [details]
Patch
Comment 3 EWS Watchlist 2019-01-30 06:05:08 PST
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
Comment 4 Michael Catanzaro 2019-01-30 07:25:40 PST
Comment on attachment 360573 [details]
Patch

I bet Miguel would want to review it before landing.
Comment 5 Carlos Garcia Campos 2019-01-30 08:15:18 PST
Committed r240712: <https://trac.webkit.org/changeset/240712>