Bug 186840

Summary: [GTK][ThreadedRendering][Nicosia] Themed elements cannot be rendered using threaded rendering
Product: WebKit Reporter: Miguel Gomez <magomez>
Component: WebKitGTKAssignee: Miguel Gomez <magomez>
Status: RESOLVED FIXED    
Severity: Normal CC: bugs-noreply, calvaris, cgarcia, commit-queue
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

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.