<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Wrong use of EGL_DEPTH_SIZE"
   href="https://bugs.webkit.org/show_bug.cgi?id=155536#c8">Comment # 8</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Wrong use of EGL_DEPTH_SIZE"
   href="https://bugs.webkit.org/show_bug.cgi?id=155536">bug 155536</a>
              from <span class="vcard"><a class="email" href="mailto:mcatanzaro&#64;igalia.com" title="Michael Catanzaro &lt;mcatanzaro&#64;igalia.com&gt;"> <span class="fn">Michael Catanzaro</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=292062&amp;action=diff" name="attach_292062" title="Patch">attachment 292062</a> <a href="attachment.cgi?id=292062&amp;action=edit" title="Patch">[details]</a></span>
Patch

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=292062&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=292062&amp;action=review</a>

<span class="quote">&gt; Source/WebCore/ChangeLog:10
&gt; +        EGL_BUFFER_SIZE retuned a valid depth, it still might not be supported by the default screen and XCreatePixmap</span >

retuned -&gt; returned

<span class="quote">&gt; Source/WebCore/ChangeLog:12
&gt; +        EGL config, to avoid failures when creating the pixmap. So, We can use EGL_NATIVE_VISUAL_ID instead, and</span >

We -&gt; we

<span class="quote">&gt; Source/WebCore/ChangeLog:28
&gt; +        the depthj to be passed to XCreatePixmap. Also use the XErrorTrapper class to ignore all BadDrawable errors</span >

depthj -&gt; depth

<span class="quote">&gt; Source/WebCore/platform/graphics/egl/GLContextEGL.cpp:210
&gt; +    // Some drivers fail to create the surface producing BadDrawable X error and the default XError handler normally aborts.
&gt; +    // However, if the X error is ignored, eglCreatePixmapSurface() ends up returning a surface and we can continue creating
&gt; +    // the context. Since this is an offscreen context, it doesn't matter if the pixmap used is not valid because we never do
&gt; +    // swap buffers. So, we use a custom XError handler here that ignores BadDrawable errors and only warns about any other
&gt; +    // errors without aborting in any case.
&gt; +    XErrorTrapper trapper(x11Display, XErrorTrapper::Policy::Warn, { BadDrawable });</span >

This seems like a workaround to a broken crap proprietary graphics driver. Are you sure we really want to upstream this workaround? IMO this should be carried downstream in the project for the client that made the mistake of using a proprietary graphics stack.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>