diff options
author | Xin Li <delphij@google.com> | 2019-07-01 20:58:45 +0000 |
---|---|---|
committer | Xin Li <delphij@google.com> | 2019-07-01 20:58:45 +0000 |
commit | 548937158e82864c319fb6073aee668bd0ab5b84 (patch) | |
tree | 994917bfe4c52a7ef203b8e4269402670aeef5fc | |
parent | e612ed0ba6ae6954645a666a8fc4cb9a9e67525f (diff) | |
parent | eac1c3d30672342fcd348c090917ffddcf59b4c8 (diff) | |
download | device_generic_opengl-transport-548937158e82864c319fb6073aee668bd0ab5b84.tar.gz device_generic_opengl-transport-548937158e82864c319fb6073aee668bd0ab5b84.tar.bz2 device_generic_opengl-transport-548937158e82864c319fb6073aee668bd0ab5b84.zip |
DO NOT MERGE - Merge qt-dev-plus-aosp-without-vendor (5699924) into stage-aosp-master
Bug: 134405016
Change-Id: I252d51ce69e5862e5723bc2e3e15276726d13908
-rw-r--r-- | host/libs/virglrenderer/AVDVirglRenderer.cpp | 8 | ||||
-rw-r--r-- | host/libs/virglrenderer/include/hardware/gralloc.h | 5 |
2 files changed, 12 insertions, 1 deletions
diff --git a/host/libs/virglrenderer/AVDVirglRenderer.cpp b/host/libs/virglrenderer/AVDVirglRenderer.cpp index 95e725600..973e14442 100644 --- a/host/libs/virglrenderer/AVDVirglRenderer.cpp +++ b/host/libs/virglrenderer/AVDVirglRenderer.cpp @@ -340,6 +340,14 @@ int virgl_renderer_init(void* cookie, int flags, virgl_renderer_callbacks* cb) { g_dpy = EGL_NO_DISPLAY; return ENOENT; } + + // Our static analyzer sees the `new`ing of `config` below without any sort + // of attempt to free it, and warns about it. Normally, it would catch that + // we're pushing it into a vector in the constructor, but it hits an + // internal evaluation limit when trying to evaluate the loop inside of the + // ctor. So, it never gets to see that we escape our newly-allocated + // `config` instance. Silence the warning, since it's incorrect. + // NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDeleteLeaks) for (EGLint c = 0; c < nConfigs; c++) { EGLint configId; if (!s_egl.eglGetConfigAttrib(g_dpy, configs[c], EGL_CONFIG_ID, &configId)) { diff --git a/host/libs/virglrenderer/include/hardware/gralloc.h b/host/libs/virglrenderer/include/hardware/gralloc.h index 8446ba4ea..3847164ed 100644 --- a/host/libs/virglrenderer/include/hardware/gralloc.h +++ b/host/libs/virglrenderer/include/hardware/gralloc.h @@ -42,5 +42,8 @@ struct gralloc_module_t { int (*unlockAsync)(gralloc_module_t const*, buffer_handle_t, int*); int (*lockAsync_ycbcr)(gralloc_module_t const*, buffer_handle_t, int, int, int, int, int, android_ycbcr*, int); - void* reserved_proc[3]; + int32_t (*getTransportSize)(gralloc_module_t const*, buffer_handle_t, uint32_t, uint32_t); + int32_t (*validateBufferSize)(gralloc_module_t const*, buffer_handle_t, uint32_t, uint32_t, + int32_t, int, uint32_t); + void* reserved_proc[1]; }; |