java.lang.Object | |
↳ | android.support.v8.renderscript.RenderScript |
This class provides access to a RenderScript context, which controls RenderScript initialization, resource management, and teardown. An instance of the RenderScript class must be created before any other RS objects can be created.
For more information about creating an application that uses RenderScript, read the RenderScript developer guide.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
RenderScript.ContextType | ContextType specifies the specific type of context to be created. | ||||||||||
RenderScript.Priority | RenderScript worker thread priority enumeration. | ||||||||||
RenderScript.RSErrorHandler | The runtime error handler base class. | ||||||||||
RenderScript.RSMessageHandler | The base class from which an application should derive in order to receive RS messages from scripts. |
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | CREATE_FLAG_NONE |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Print the currently available debugging information about the state of
the RS context to the log.
| |||||||||||
calls create(ctx, ct, CREATE_FLAG_NONE)
See documentation for @create for details
| |||||||||||
Create a RenderScript context.
| |||||||||||
Gets or creates a RenderScript context of the specified type.
| |||||||||||
Gets or creates a RenderScript context of the specified type.
| |||||||||||
Create a RenderScript context.
| |||||||||||
Destroys this RenderScript context.
| |||||||||||
Wait for any pending asynchronous opeations (such as copies to a RS
allocation or RS script executions) to complete.
| |||||||||||
Force using support lib runtime.
| |||||||||||
Gets the application context associated with the RenderScript context.
| |||||||||||
Releases all the process contexts.
| |||||||||||
Place a message into the message queue to be sent back to the message
handler once all previous commands have been executed.
| |||||||||||
Sets the blackList of Models to only use support lib runtime.
| |||||||||||
Change the priority of the worker threads for this context.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Print the currently available debugging information about the state of the RS context to the log.
calls create(ctx, ct, CREATE_FLAG_NONE) See documentation for @create for details
ctx | The context. |
---|---|
ct | The type of context to be created. |
Create a RenderScript context. See documentation for @create for details
ctx | The context. |
---|
Gets or creates a RenderScript context of the specified type.
ctx | The context. |
---|---|
sdkVersion | The target SDK Version. |
ct | The type of context to be created. |
flags | The OR of the CREATE_FLAG_* options desired |
Gets or creates a RenderScript context of the specified type. The returned context will be cached for future reuse within the process. When an application is finished using RenderScript it should call releaseAllContexts() A process context is a context designed for easy creation and lifecycle management. Multiple calls to this function will return the same object provided they are called with the same options. This allows it to be used any time a RenderScript context is needed.
ctx | The context. |
---|---|
ct | The type of context to be created. |
flags | The OR of the CREATE_FLAG_* options desired |
Create a RenderScript context. This is an advanced function intended for applications which need to create more than one RenderScript context to be used at the same time. If you need a single context please use create()
ctx | The context. |
---|
Destroys this RenderScript context. Once this function is called, using this context or any objects belonging to this context is illegal. This function is a NOP if the context was created with create(). Please use releaseAllContexts() to clean up contexts created with the create function.
Wait for any pending asynchronous opeations (such as copies to a RS allocation or RS script executions) to complete.
Force using support lib runtime. Should be used before context create.
Gets the application context associated with the RenderScript context.
Releases all the process contexts. This is the same as calling .destroy() on each unique context retreived with create(...). If no contexts have been created this function does nothing. Typically you call this when your application is losing focus and will not be using a context for some time. This has no effect on a context created with createMultiContext()
Place a message into the message queue to be sent back to the message handler once all previous commands have been executed.
Sets the blackList of Models to only use support lib runtime. Should be used before context create.
blackList | User provided black list string. Format: "(MANUFACTURER1:PRODUCT1:MODEL1), (MANUFACTURER2:PRODUCT2:MODEL2)..." e.g. : To Blacklist Nexus 7(2013) and Nexus 5. mBlackList = "(asus:razor:Nexus 7), (LGE:hammerhead:Nexus 5)"; |
---|
Change the priority of the worker threads for this context.
p | New priority to be set. |
---|