diff options
author | Yahan Zhou <yahan@google.com> | 2017-01-23 02:07:09 -0800 |
---|---|---|
committer | Greg Hartman <ghartman@google.com> | 2018-08-23 17:30:51 -0700 |
commit | e85e7930301177a25c49bd51aac0ede2744632f3 (patch) | |
tree | 07a4d0f075a015a340a3000019b8ff2d0df54d03 | |
parent | 389d97349f6ea7922dd4f36d38ca243a6f0796b6 (diff) | |
download | opengl-transport-e85e7930301177a25c49bd51aac0ede2744632f3.tar.gz |
[GPU snapshot] Framebuffer and contexts snapshot
This patch snapshot FrameBuffer and RenderContexts. With this patch,
after from a GPU snapshot, the emulator should not crash but it will
complain about invalid window surface handle.
Next step: snapshot window surfaces
TODO:
call eglMakeCurrent after loading
refactor objectNameManager so that shared groups are indexed by ID
better interface for EglContext::onLoad
clean up the code
Change-Id: I7aa740f215f96c054634f08d5862bbc9534728c1
-rw-r--r-- | host/libs/virglrenderer/OpenGLESDispatch/EGLDispatch.cpp | 1 | ||||
-rw-r--r-- | host/libs/virglrenderer/OpenGLESDispatch/EGLDispatch.h | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/host/libs/virglrenderer/OpenGLESDispatch/EGLDispatch.cpp b/host/libs/virglrenderer/OpenGLESDispatch/EGLDispatch.cpp index fe0cbfb4a..c068ee3b2 100644 --- a/host/libs/virglrenderer/OpenGLESDispatch/EGLDispatch.cpp +++ b/host/libs/virglrenderer/OpenGLESDispatch/EGLDispatch.cpp @@ -44,6 +44,7 @@ bool init_egl_dispatch() { } LIST_RENDER_EGL_FUNCTIONS(RENDER_EGL_LOAD_FIELD) LIST_RENDER_EGL_EXTENSIONS_FUNCTIONS(RENDER_EGL_LOAD_OPTIONAL_FIELD) + LIST_RENDER_EGL_SNAPSHOT_FUNCTIONS(RENDER_EGL_LOAD_FIELD) return true; } diff --git a/host/libs/virglrenderer/OpenGLESDispatch/EGLDispatch.h b/host/libs/virglrenderer/OpenGLESDispatch/EGLDispatch.h index a361954fe..58102e95a 100644 --- a/host/libs/virglrenderer/OpenGLESDispatch/EGLDispatch.h +++ b/host/libs/virglrenderer/OpenGLESDispatch/EGLDispatch.h @@ -17,6 +17,7 @@ #include "OpenGLESDispatch/RenderEGL_functions.h" #include "OpenGLESDispatch/RenderEGL_extensions_functions.h" +#include "OpenGLESDispatch/RenderEGL_snapshot_functions.h" // This header is used to define the EGLDispatch structure that contains // pointers to the EGL shared library used by libOpenglRender. Normally, @@ -39,11 +40,13 @@ // Define function typedefs. LIST_RENDER_EGL_FUNCTIONS(RENDER_EGL_DEFINE_TYPE) LIST_RENDER_EGL_EXTENSIONS_FUNCTIONS(RENDER_EGL_DEFINE_TYPE) +LIST_RENDER_EGL_SNAPSHOT_FUNCTIONS(RENDER_EGL_DEFINE_TYPE) // Define EGLDispatch structure. struct EGLDispatch { LIST_RENDER_EGL_FUNCTIONS(RENDER_EGL_DECLARE_MEMBER) LIST_RENDER_EGL_EXTENSIONS_FUNCTIONS(RENDER_EGL_DECLARE_MEMBER) + LIST_RENDER_EGL_SNAPSHOT_FUNCTIONS(RENDER_EGL_DECLARE_MEMBER) }; // Initialize EGLDispatch function. Return true on success, false on failure. |