<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>257599</bug_id>
          
          <creation_ts>2023-06-01 02:47:59 -0700</creation_ts>
          <short_desc>[GStreamer] Do not activate and fill the gst GL context</short_desc>
          <delta_ts>2023-06-16 06:01:48 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Media</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=258199</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Gtk, InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Carlos Garcia Campos">cgarcia</reporter>
          <assigned_to name="Carlos Garcia Campos">cgarcia</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>magomez</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1959309</commentid>
    <comment_count>0</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2023-06-01 02:47:59 -0700</bug_when>
    <thetext>We currently create the GstGLContext wrapping the sharing context and it&apos;s activated in the main thread. That means, among other things, that gst sends all gl operations on the context to the main thread. Another side effect is that the sharing context is made current in the main thread and remains forever.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1959312</commentid>
    <comment_count>1</comment_count>
    <who name="Miguel Gomez">magomez</who>
    <bug_when>2023-06-01 02:54:52 -0700</bug_when>
    <thetext>Isn&apos;t gstreamer creating a new glcontext in its own thread (one of the many that it uses) and sending its gl operations there? I would expect so.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1959317</commentid>
    <comment_count>2</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2023-06-01 02:59:23 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/14583</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1959318</commentid>
    <comment_count>3</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2023-06-01 03:00:49 -0700</bug_when>
    <thetext>(In reply to Miguel Gomez from comment #1)
&gt; Isn&apos;t gstreamer creating a new glcontext in its own thread (one of the many
&gt; that it uses) and sending its gl operations there? I would expect so.

I don&apos;t think so, it does that when not creating a wrapping context.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1959329</commentid>
    <comment_count>4</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2023-06-01 04:14:48 -0700</bug_when>
    <thetext>(In reply to Carlos Garcia Campos from comment #3)
&gt; (In reply to Miguel Gomez from comment #1)
&gt; &gt; Isn&apos;t gstreamer creating a new glcontext in its own thread (one of the many
&gt; &gt; that it uses) and sending its gl operations there? I would expect so.
&gt; 
&gt; I don&apos;t think so, it does that when not creating a wrapping context.

hmm, it&apos;s not created for the wrapped context, but another one is created apparently, so I was indeed wrong. I&apos;ll continue checking, the patch would still be needed, though to avoid using the sharing context.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1959330</commentid>
    <comment_count>5</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2023-06-01 04:46:42 -0700</bug_when>
    <thetext>Ok, I see how it works now, our wrapped context is indeed only used as the sharing context of a gl context created by gst and used in a dedicated thread. I&apos;m sorry for the noise, but this patch doesn&apos;t make sense as is. I&apos;ll close the PR for now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1959332</commentid>
    <comment_count>6</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2023-06-01 05:44:31 -0700</bug_when>
    <thetext>It&apos;s only used as a sharing context, so it doesn&apos;t need to be activated and filled. This ways we avoid making the sharing context the current one in the main thread forever.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1959333</commentid>
    <comment_count>7</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2023-06-01 05:46:05 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/14586</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1959511</commentid>
    <comment_count>8</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2023-06-02 01:50:42 -0700</bug_when>
    <thetext>Committed 264826@main (d4b48c265736): &lt;https://commits.webkit.org/264826@main&gt;

Reviewed commits have been landed. Closing PR #14586 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1959512</commentid>
    <comment_count>9</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-06-02 01:51:17 -0700</bug_when>
    <thetext>&lt;rdar://problem/110158904&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>