Most visited

Recently visited

RenderScript Input/Output Functions

Overview

These functions are used to:

  • Send information to the Java client, and
  • Send the processed allocation or receive the next allocation to process.

Summary

Functions
rsAllocationIoReceive Receive new content from the queue
rsAllocationIoSend Send new content to the queue
rsSendToClient Send a message to the client, non-blocking
rsSendToClientBlocking Send a message to the client, blocking

Functions

rsAllocationIoReceive : Receive new content from the queue

void rsAllocationIoReceive(rs_allocation a); Added in API level 16
Parameters
aAllocation to work on.

Receive a new set of contents from the queue.

rsAllocationIoSend : Send new content to the queue

void rsAllocationIoSend(rs_allocation a); Added in API level 16
Parameters
aAllocation to work on.

Send the contents of the Allocation to the queue.

rsSendToClient : Send a message to the client, non-blocking

bool rsSendToClient(int cmdID);
bool rsSendToClient(int cmdID, const void* data, uint len);
Parameters
cmdID
dataApplication specific data.
lenLength of the data, in bytes.

Sends a message back to the client. This call does not block. It returns true if the message was sent and false if the message queue is full.

A message ID is required. The data payload is optional.

See RenderScript.RSMessageHandler.

rsSendToClientBlocking : Send a message to the client, blocking

void rsSendToClientBlocking(int cmdID);
void rsSendToClientBlocking(int cmdID, const void* data, uint len);
Parameters
cmdID
dataApplication specific data.
lenLength of the data, in bytes.

Sends a message back to the client. This function will block until there is room on the message queue for this message. This function may return before the message was delivered and processed by the client.

A message ID is required. The data payload is optional.

See RenderScript.RSMessageHandler.

Hooray!