From c7062268956b5b8cbeab3f7c824eb0fb797f4259 Mon Sep 17 00:00:00 2001 From: Vinil Cheeramvelil Date: Tue, 2 Jun 2015 15:34:48 -0700 Subject: IMG DDK1.5 update for Intel HWC interface in libmix Bug: 20914944 Bug: 20302101 Bug: 19412176 Bug: 21265944 Change-Id: I26015436a84cf52cb147ce803610322932b70478 Signed-off-by: Pradeep Radhakrishna Signed-off-by: Vinil Cheeramvelil --- videoencoder/Android.mk | 3 ++- videoencoder/VideoEncoderUtils.cpp | 10 +++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/videoencoder/Android.mk b/videoencoder/Android.mk index cb8528f..8e2e1cd 100644 --- a/videoencoder/Android.mk +++ b/videoencoder/Android.mk @@ -53,7 +53,8 @@ LOCAL_SHARED_LIBRARIES := \ libva-android \ libva-tpi \ libhardware \ - libintelmetadatabuffer + libintelmetadatabuffer \ + libsync LOCAL_COPY_HEADERS_TO := libmix_videoencoder diff --git a/videoencoder/VideoEncoderUtils.cpp b/videoencoder/VideoEncoderUtils.cpp index 5f78879..067e9e7 100644 --- a/videoencoder/VideoEncoderUtils.cpp +++ b/videoencoder/VideoEncoderUtils.cpp @@ -22,6 +22,7 @@ #ifdef IMG_GFX #include #include +#include //#define GFX_DUMP @@ -161,7 +162,14 @@ static int gfx_Blit(buffer_handle_t src, buffer_handle_t dest, IMG_gralloc_module_public_t* GrallocMod = (IMG_gralloc_module_public_t*)gModule; #ifdef MRFLD_GFX - err = GrallocMod->Blit(GrallocMod, src, dest, w, h, 0, 0, 0, 0); + { + int fenceFd; + err = GrallocMod->Blit(GrallocMod, src, dest, w, h, 0, 0, 0, -1, &fenceFd); + if (!err) { + sync_wait(fenceFd, -1); + close(fenceFd); + } + } #else err = GrallocMod->Blit2(GrallocMod, src, dest, w, h, 0, 0); #endif -- cgit v1.2.3