From 17966517a1ecbe38b276235967dbc03b58628bbc Mon Sep 17 00:00:00 2001 From: Jason Sams Date: Wed, 28 Jul 2010 11:17:53 -0700 Subject: Cleanup sendToClient and add rsGetDt(). Remove legacy implemtation of matrix calls which were moved to llvm bc. Change-Id: I527740590067db3bcb2147233ef41fb057f1d2a8 --- libs/rs/rsContext.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'libs/rs/rsContext.cpp') diff --git a/libs/rs/rsContext.cpp b/libs/rs/rsContext.cpp index d6df581..d1784f3 100644 --- a/libs/rs/rsContext.cpp +++ b/libs/rs/rsContext.cpp @@ -780,9 +780,13 @@ bool Context::sendMessageToClient(void *data, uint32_t cmdID, size_t len, bool w } } //LOGE("sendMessageToClient 2"); - void *p = mIO.mToClient.reserve(len); - memcpy(p, data, len); - mIO.mToClient.commit(cmdID, len); + if (len > 0) { + void *p = mIO.mToClient.reserve(len); + memcpy(p, data, len); + mIO.mToClient.commit(cmdID, len); + } else { + mIO.mToClient.commit(cmdID, 0); + } //LOGE("sendMessageToClient 3"); return true; } -- cgit v1.1