<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [GTK][EFL] Unify platform display handling"
   href="https://bugs.webkit.org/show_bug.cgi?id=144517">144517</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[GTK][EFL] Unify platform display handling
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>528+ (Nightly build)
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Keywords</th>
          <td>Gtk
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Platform
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>cgarcia&#64;igalia.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>gns&#64;gnome.org, gyuyoung.kim&#64;webkit.org, ossy&#64;webkit.org, zan&#64;falconsigh.net
          </td>
        </tr></table>
      <p>
        <div>
        <pre>There are several places were we are handling the X display connection:

 - GLContext::sharedX11Display() creates a new connection.
 - X11Helper::nativeDisplay() creates a new connection.
 - BackingStoreBackendCairoX11 uses the GTK+ shared connection.
 - NetscapePlugin::x11HostDisplay() uses the GTK+/ecore shared connection
 - The rest of the GTK+ code uses the shared GTK+ connection

And then we also have WaylandDisplay and the code to check if the current display is wayland or X11.

We could unify all these to share the same connection to reduce the amount of ifdefs and ensure a single connection. That will also allow us to use &quot;smart pointers&quot; for the X resources that need a Display* to be freed.</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>