+\begin{frame}
+ \frametitle{Extensions and new approach}
+
+ \setbeamercolor{block body}{bg=white}
+ \setbeamertemplate{itemize/enumerate body begin}{\tiny}
+
+% \begin{comment}
+% \begin{block}{\scriptsize{How the kernel DMA buffers would help us avoid copying
+% the WebGL texture data?}}
+%
+% \begin{center}
+% \begin{itemize}
+% \item Each texture is backed by a Linux kernel dma\_buffer.
+% \item Multiple textures can use the same dma buffer as backing
+% storage if they meet some requirements.
+% \item We can export the file descriptor of one buffer from one
+% driver and use it to access the buffer from the other
+% driver.
+% \item So we can export the fd that corresponds to the compositor
+% texture, import it in WebGL when we create the render target
+% and when the WebGL texture is filled, the compositor texture
+% will be also filled, as they share the backing storage!
+% \end{itemize}
+% \end{center}
+% \end{block}
+% \end{comment}
+
+ \begin{block}{\scriptsize{EGL and GL extensions to share content across
+ drivers using dma\_buf buffers:}}
+ \begin{center}
+ \begin{itemize}
+ \item
+ \href{https://www.khronos.org/registry/EGL/extensions/MESA/EGL\_MESA\_image\_dma\_buf\_export.txt}{EGL\_MESA\_image\_dma\_buf\_export}:
+ \\ This extension allows creating one or multiple Linux dma\_buf
+ file descriptors from the EGLImage that corresponds to a texture.
+ \item \href{https://www.khronos.org/registry/EGL/extensions/EXT/EGL\_EXT\_image\_dma\_buf\_import.txt}{EGL\_EXT\_image\_dma\_buf\_import}:
+ \\ This extension allows creating an EGLImage (that will be used to create a
+ texture) from one or multiple Linux dma\_buf file
+ descriptors.
+ \item \href{https://www.khronos.org/registry/EGL/extensions/EXT/EGL\_EXT\_image\_dma\_buf\_import\_modifiers.txt}{EGL\_EXT\_image\_dma\_buf\_import\_modifiers}:
+ \\ This extension builds on EGL\_EXT\_image\_dma\_buf\_import, in order to support
+ format modifiers used for tiling, compression, and additional non-linear
+ modes.
+ \item \href{https://www.khronos.org/registry/OpenGL/extensions/OES/OES\_EGL\_image\_external.txt}{OES\_EGL\_image\_external}:
+ \\ This extension provides a mechanism for creating EGLImage texture targets
+ from EGLImages.
+ \end{itemize}
+ \end{center}
+ \end{block}
+ \begin{block}{\scriptsize{Example Programs:}}
+ \begin{center}
+ \begin{itemize}
+ \item Associating two textures with the contents of the same
+ buffer without copy taking place.\\
+ Blog post: \url{https://eleni.mutantstargoat.com/hikiko/egl-dma-1/} \\
+ Code: \url{https://gistof.com/dma-egl-version}
+ \item Sharing texture data between ANGLE and the native system
+ driver using DMA buffers and EGL. \\
+ Blog post: \url{https://eleni.mutantstargoat.com/hikiko/angle-dma/}\\
+ Code: \url{https://gistof.com/dmaangleeglversion}
+ \end{itemize}
+ \end{center}
+ \end{block}
+
+\end{frame}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\begin{frame}
+ \frametitle{Example:}
+
+ \setbeamercolor{block body}{bg=white}{\scriptsize}
+ \setbeamertemplate{itemize/enumerate body begin}{\tiny}
+
+ \begin{block}{\scriptsize{Snippet from the exporter:}}
+ \tiny{
+ \begin{table}[t]
+ \centering
+ \begin{tabular}{l}
+ {\color{coolblack}Exporting a dma buffer from a texture
+ \texttt{texA}:}\\
+ \\
+ \begin{adjustbox}{max width=\textwidth}
+ \adjustbox{valign=t}{\includegraphics[height=6.5cm]{data/dma_export_and_struct.png}}
+ \end{adjustbox}\\
+ \end{tabular}
+ \end{table}
+ }
+ \end{block}
+\end{frame}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\begin{frame}
+ \frametitle{Example continued}
+ \setbeamercolor{block body}{bg=white}{\scriptsize}
+ \setbeamertemplate{itemize/enumerate body begin}{\tiny}
+
+ \begin{block}{\scriptsize{Snippets from the importer:}}
+ \vspace{-0.1cm}
+ \tiny{
+ \begin{table}[t]
+ \centering
+ \begin{tabular}{l}
+ {\color{coolblack}Creating an EGLImage from the dma buffer using
+ the exported fd and the exported modifiers:}\\
+ \\
+ \begin{adjustbox}{max width=\textwidth}
+ \adjustbox{valign=t}{\includegraphics[height=3.5cm]{data/dma_import.png}}
+ \end{adjustbox}\\
+\\
+\\
+ {\color{coolblack}Creating a texture using that external
+ EGLImage:}\\
+ \\
+ \begin{adjustbox}{max width=\textwidth}
+ \adjustbox{valign=t}{\includegraphics[height=2cm]{data/dma_targetteture2does.png}}
+ \end{adjustbox}\\
+ \end{tabular}
+ \end{table}
+ }
+ \end{block}
+\end{frame}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\begin{frame}
+ \frametitle{Final test program (WORKS!)}
+
+ \begin{block}{\scriptsize{An exporter-importer that uses ANGLE and native
+ EGL}}
+ \setbeamertemplate{itemize/enumerate body begin}{\scriptsize}
+ \begin{itemize}
+ \itemsep0.3cm
+ \item First context is EGL/OpenGL like the one in main graphics
+ pipeline.
+ \item Second is ANGLE with EGL/GLESv2 backend like the one in
+ WebGL2.
+ \item EGL/OpenGL context creates an empty texture and exports the dma\_buf
+ fd and all other information about the buffer.
+ \item ANGLE context creates another empty texture using the same
+ dma\_buf and the import mechanism.
+ \item ANGLE context fills the emty ANGLE texture.
+ \item EGL/OpenGL context displays the previously empty OpenGL/EGL
+ texture.
+ \item EGL/OpenGL texture contains what ANGLE texture had.
+ \item \textbf{We shared the ANGLE data without copying them!}
+ \end{itemize}
+
+ \end{block}
+ \vspace{0.2cm}
+ \scriptsize{
+ \begin{center}
+ \textbf{\color{coolblack}Check the blog posts for more details!}
+ \end{center}
+ }
+\end{frame}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+