add synchronization after renderscript calls