Lines Matching refs:smem
127 static status_t WriteMemObjToBinder(Parcel& data, ShareMemMap* smem) { in WriteMemObjToBinder() argument
129 if (smem->type >= ST_MAX) in WriteMemObjToBinder()
134 data.writeInt32(smem->type); in WriteMemObjToBinder()
136 if (smem->type == ST_MEMBASE) /*offset, size, heap*/ in WriteMemObjToBinder()
140 sp<IMemoryHeap> heap = smem->membase->getMemory(&offset, &size); in WriteMemObjToBinder()
146 heap->getHeapID(), smem->membase->pointer(), *((int *)(smem->membase->pointer()))); in WriteMemObjToBinder()
149 else if (smem->type == ST_GFX) /*graphicbuffer*/ in WriteMemObjToBinder()
150 data.write(*(smem->gbuffer)); in WriteMemObjToBinder()
222 static void PushShareMem(ShareMemMap* &smem) in PushShareMem() argument
225 gShareMemMapList.push_back(smem); in PushShareMem()
311 ShareMemMap* smem = FindShareMem(sessionflag, value, false); in onTransact() local
312 if (smem && (NO_ERROR == WriteMemObjToBinder(*reply, smem))) in onTransact()
450 ShareMemMap* smem = FindShareMem(mSessionFlag, mValue, true); in GetValue() local
451 if(smem) in GetValue()
453 value = smem->value; in GetValue()
477 smem = ReadMemObjFromBinder(reply, mSessionFlag, mValue); in GetValue()
478 if (smem) in GetValue()
479 value = smem->value; in GetValue()
706 ShareMemMap smem; in ShareValue() local
707 smem.membase = mem; in ShareValue()
708 smem.type = ST_MEMBASE; in ShareValue()
709 if (WriteMemObjToBinder(data, &smem) != NO_ERROR) in ShareValue()
722 ShareMemMap* smem = new ShareMemMap; in ShareValue() local
723 smem->sessionflag = mSessionFlag; in ShareValue()
724 smem->value = mValue; in ShareValue()
725 smem->value_backup = mValue; in ShareValue()
726 smem->type = ST_MEMBASE; in ShareValue()
727 smem->membase = mem; in ShareValue()
728 smem->gbuffer = NULL; in ShareValue()
729 PushShareMem(smem); in ShareValue()
758 ShareMemMap smem; in ShareValue() local
759 smem.gbuffer = gbuffer; in ShareValue()
760 smem.type = ST_GFX; in ShareValue()
761 if (WriteMemObjToBinder(data, &smem) != NO_ERROR) in ShareValue()
774 ShareMemMap* smem = new ShareMemMap; in ShareValue() local
775 smem->sessionflag = mSessionFlag; in ShareValue()
776 smem->value = mValue; in ShareValue()
777 smem->value_backup = mValue; in ShareValue()
778 smem->type = ST_GFX; in ShareValue()
779 smem->membase = NULL; in ShareValue()
780 smem->gbuffer = gbuffer; in ShareValue()
781 PushShareMem(smem); in ShareValue()