Skip to content

Most visited

Recently visited

navigation

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.

This function should not be called from inside a kernel, or from any function that may be called directly or indirectly from a kernel. Doing so would cause a runtime error.

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.

This function should not be called from inside a kernel, or from any function that may be called directly or indirectly from a kernel. Doing so would cause a runtime error.

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.

This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Follow Google Developers on WeChat

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a short survey?
Help us improve the Android developer experience.
(Sep 2017 survey)