1
0
Fork 0
No description
Find a file
Lauri Peltonen 77d6d7a907 drm_hwcomposer: Cache FB and gem in gralloc buffer
Move drm fb object creation to the importer.

In NV importer, use GRALLOC_MODULE_PERFORM_SET_IMPORTER_PRIVATE
and GRALLOC_MODULE_PERFORM_GET_IMPORTER_PRIVATE to cache the hwc_drm_bo
in the gralloc buffer.  This avoids the need to recreate fb objects
again each frame, and also greatly simplifies managing the lifetime of
the gem handles.

The drm_gralloc importer does not support caching at this point.  In an
attempt to keep it somewhat working, add hwc_import_bo_release function
that hwc calls when it's ok to rm fb.  If hwc_import_bo_release returns
true, then hwc will clean up gem handles as it did before.

We should consider doing a follow-up patch that adds fb/gem caching to
drm_gralloc importer also.  Then some of the code that is kept in this
patch for backwards compatibility can be removed.

Change-Id: I92857dcaddf8cea219ebc041e16ef76087a1b696
Reviewed-on: https://chrome-internal-review.googlesource.com/200895
Reviewed-by: Stéphane Marchesin <marcheu@google.com>
Commit-Queue: Stéphane Marchesin <marcheu@google.com>
Tested-by: Stéphane Marchesin <marcheu@google.com>
2015-02-26 06:31:41 +00:00
Android.mk drm_hwcomposer: Support Nvidia gralloc 2015-02-14 02:04:16 +00:00
drm_hwcomposer.h drm_hwcomposer: Cache FB and gem in gralloc buffer 2015-02-26 06:31:41 +00:00
hwcomposer.cpp drm_hwcomposer: Cache FB and gem in gralloc buffer 2015-02-26 06:31:41 +00:00
hwcomposer_import_drm_gralloc.cpp drm_hwcomposer: Cache FB and gem in gralloc buffer 2015-02-26 06:31:41 +00:00
hwcomposer_import_nv_gralloc.cpp drm_hwcomposer: Cache FB and gem in gralloc buffer 2015-02-26 06:31:41 +00:00