changed title
[webkit_codecamp] / codecamp.tex
index 4a9cb6e..1f0b139 100644 (file)
 \setbeamertemplate{blocks}[default]
 \setbeamercolor{block title}{fg=amber,bg=black}
 
-\title{\textbf{Sharing texture data between drivers}}
+\title{\textbf{Sharing texture data across EGL drivers}}
 \author[Eleni Maria Stea <estea@igalia.com>]{\small{Eleni Maria Stea
 <estea@igalia.com>}\\\\\includegraphics{data/igalia.eps}}
 \date{\tiny{WebKit Codecamp}}
 \end{comment}
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section[Introduction]{Introduction: Using ANGLE in WebGL2}
+\section[Introduction]{Introduction: Using ANGLE in WebGL2 (WebKit)}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 \begin{frame}[fragile,c]
@@ -733,7 +733,7 @@ program}
                \setbeamercolor{block body}{bg=white}
                \setbeamercolor{block title}{bg=white, fg=coolblack}
                \begin{block}{\scriptsize{There is a Linux kernel framework that can be used for
-                       content sharing between different Linux drivers!}}
+                       content sharing across different Linux drivers!}}
 
                        \vspace{-0.1cm}
                        \begin{table}[t]
@@ -773,8 +773,8 @@ program}
        \setbeamercolor{block body}{bg=white}
        \setbeamertemplate{itemize/enumerate body begin}{\tiny}
 
-       \begin{block}{How the kernel DMA buffers would help us avoid copying
-               the WebGL texture data?}
+       \begin{block}{\scriptsize{How the kernel DMA buffers would help us avoid copying
+               the WebGL texture data?}}
 
                \begin{center}
                        \begin{itemize}
@@ -791,19 +791,24 @@ program}
                        \end{itemize}
                \end{center}
        \end{block}
-       \begin{block}{Some EGL extensions make easy this exchange:}
+       \begin{block}{\scriptsize{EGL and GL extensions that can be used:}}
                \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
+                                       \\ 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
+                                       \\ This extension allows creating an EGLImage (that will be used to create a
                                        texture) from one or multiple Linux dma\_buf file
                                        descriptors.
-                               \item {}{}
-                               \item {}{}
+                               \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}
@@ -812,20 +817,108 @@ program}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 \begin{frame}
-       \frametitle{Example use}
+       \frametitle{Example:}
 
+       \setbeamercolor{block body}{bg=white}{\scriptsize}
+       \setbeamertemplate{itemize/enumerate body begin}{\tiny}
+
+       \begin{block}{\scriptsize{I've written an example:}}
+               \begin{center}
+                       \begin{itemize}
+                               \item First using EGL!\\
+                                       Blog post: \url{https://eleni.mutantstargoat.com/hikiko/egl-dma-1/} \\
+                                       Code: \url{https://gistof.com/dma-egl-version}
+                               \item Then using a native EGL context and a context from ANGLE!\\
+                                       Blog post: \url{https://eleni.mutantstargoat.com/hikiko/angle-dma/}\\
+                                       Code: \url{https://gistof.com/dmaangleeglversion}
+                       \end{itemize}
+               \end{center}
+       \end{block}
+       \vspace{-0.3cm}
+       \begin{block}{\scriptsize{Snippet from the exporter:}}
+               \vspace{-0.1cm}
+               \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=4cm]{data/dma_export_and_struct.png}}
+                               \end{adjustbox}\\
+                       \end{tabular}
+               \end{table}
+               }
+       \end{block}
 \end{frame}
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 \begin{frame}
-       \frametitle{Example program}
+       \frametitle{Example continued}
+       \setbeamercolor{block body}{bg=white}{\scriptsize}
+       \setbeamertemplate{itemize/enumerate body begin}{\tiny}
 
-       Code:
-       Blog post:
+       \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{Test program}
+
+       \begin{block}{\scriptsize{An exporter-importer that uses ANGLE and native
+               EGL}}
+               \setbeamertemplate{itemize/enumerate body begin}{\scriptsize}
+               \begin{itemize}
+                       \itemsep0.3cm
+                       \itemsep0.2cm
+                       \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}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -864,7 +957,6 @@ program}
 
         }
     \end{block}
-
 \vspace{0.3cm}
 \end{frame}
 
@@ -884,24 +976,7 @@ program}
     \frametitle{WIP WebKit:}
        \center{\normalsize{\textbf{\color{coolblack}{Ongoing work on WebKit}}}}
 
-       \vspace{0.3cm}
-
-       {\footnotesize{
-       \begin{block}{DONE/WIP/TODO}
-            \begin{itemize}
-                \item{Use the right CMake options (one can't simply enable
-                    \texttt{USE\_ANGLE\_WEBGL} ☺):
-                    \color{coolblack}{\textbf{FIXED }}}
-                \item{There were compile errors when ANGLE was used: 
-                    \color{coolblack}{\textbf{FIXED/Pending to send the patches}}}
-                \item{Link errors when ANGLE is used:
-                    \color{coolblack}{\textbf{WIP/Partially FIXED}}}
-                \item{Copy replacement: \color{coolblack}{\textbf{WIP/TODO}}}
-            \end{itemize}
-       \end{block}
-       }}
-
-       \vspace{0.2cm}
+       \vspace{0.1cm}
        \begin{center}
                \setbeamertemplate{itemize/enumerate body begin}{\scriptsize}
                \setbeamertemplate{itemize/enumerate subbody begin}[circle]{\tiny}
@@ -916,6 +991,22 @@ program}
                                        something else (libgbm? copying?)}
                        \end{itemize}
        \end{center}
+       \vspace{0.05cm}
+       {\scriptsize{
+       \begin{block}{DONE/WIP/TODO}
+            \begin{itemize}
+                \item{Use the right CMake options (one can't simply enable
+                    \texttt{USE\_ANGLE\_WEBGL}!):
+                    \color{coolblack}{\textbf{FIXED }}}
+                \item{There were compile errors when ANGLE was used: 
+                    \color{coolblack}{\textbf{FIXED/Pending to send the patches}}}
+                \item{Link errors when ANGLE is used:
+                    \color{coolblack}{\textbf{WIP/Partially FIXED}}}
+                \item{Copy replacement: \color{coolblack}{\textbf{WIP/TODO}}}
+            \end{itemize}
+       \end{block}
+       }}
+
 \end{frame}
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%