Bug 186840 - [GTK][ThreadedRendering][Nicosia] Themed elements cannot be rendered using threaded rendering
Summary: [GTK][ThreadedRendering][Nicosia] Themed elements cannot be rendered using th...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Miguel Gomez
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-20 02:00 PDT by Miguel Gomez
Modified: 2018-06-20 04:06 PDT (History)
4 users (show)

See Also:


Attachments
Patch (2.09 KB, patch)
2018-06-20 02:03 PDT, Miguel Gomez
no flags Details | Formatted Diff | Diff
Patch (1.51 KB, patch)
2018-06-20 03:14 PDT, Miguel Gomez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Miguel Gomez 2018-06-20 02:00:58 PDT
Scrollbars in wkgtk are rendered by the gtk theme using cairo directly. In order to do this, the cairo cr of the current GraphicsContext is gotten through the PlatformContext.

But when using threaded rendering, the GraphicsContext used for recording the commands doesn't have a PlatformContext, so when trying to draw the scrollbars there's a crash.
Comment 1 Miguel Gomez 2018-06-20 02:03:01 PDT
Created attachment 343143 [details]
Patch
Comment 2 Carlos Garcia Campos 2018-06-20 02:11:10 PDT
Comment on attachment 343143 [details]
Patch

Does this mean scrollbars will not be rendered at all when using the threaded painting? What about other places where graphicsContext.platformContext()->cr() is used, like RenderThemeGtk?
Comment 3 Miguel Gomez 2018-06-20 02:16:26 PDT
(In reply to Carlos Garcia Campos from comment #2)
> Comment on attachment 343143 [details]
> Patch
> 
> Does this mean scrollbars will not be rendered at all when using the
> threaded painting? What about other places where
> graphicsContext.platformContext()->cr() is used, like RenderThemeGtk?

I was just doing more testing and I realized that,as you say, not only the scrollbars but everything that's rendered by the theme has the same problem.

This is a wrong fix then. We need to be able to exclude layers with themed elements from the threaded rendering or completely disable threaded rendering in wkgtk.
Comment 4 Miguel Gomez 2018-06-20 03:08:07 PDT
As theme integration is not a priority at this point, and we need to finish the threaded rendering path in wpe, we are going to keep it disabled on wkgtk for the moment.
Comment 5 Miguel Gomez 2018-06-20 03:14:56 PDT
Created attachment 343146 [details]
Patch
Comment 6 WebKit Commit Bot 2018-06-20 04:06:03 PDT
Comment on attachment 343146 [details]
Patch

Clearing flags on attachment: 343146

Committed r233009: <https://trac.webkit.org/changeset/233009>
Comment 7 WebKit Commit Bot 2018-06-20 04:06:05 PDT
All reviewed patches have been landed.  Closing bug.