drm_hwcomposer: Move eglCreateImageKHR into Importer
Since NV has a "special" nonstandard way to get an EGLImage from a
handle, move this into Importer where the other NV specialness is
abstracted. For the platformdrmgeneric case, use the dmabuf EGL
Extension.
Change-Id: I5353f4c95f55174df55ba92931cdc9a9eab80dca
Signed-off-by: Robert Foss <robert.foss@collabora.com>
diff --git a/platform.h b/platform.h
index 70e5e81..e417bf7 100644
--- a/platform.h
+++ b/platform.h
@@ -38,6 +38,10 @@
// Creates a platform-specific importer instance
static Importer *CreateInstance(DrmResources *drm);
+ // Imports EGLImage for glcompositor, since NV handles this in non-standard
+ // way, and fishing out the details is specific to the gralloc used.
+ virtual EGLImageKHR ImportImage(EGLDisplay egl_display, buffer_handle_t handle) = 0;
+
// Imports the buffer referred to by handle into bo.
//
// Note: This can be called from a different thread than ReleaseBuffer. The