Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 9. Graphics and animation > Introducing RenderScript for Android

9.4. Introducing RenderScript for Android

RenderScript is a new API in Android that is focused on helping developers who need extremely high performance for graphics and computationally intensive operations. RenderScript isn’t completely new to Android 3.0+; it’s been part of earlier versions in 2.0 but not publicly available. As of Android 3, RenderScript has come to the fore as the tool of choice for graphically intensive games and applications such as live wallpapers, the new video carousel, and Google’s e-book reader on the Xoom. In this section, we’ll look at how RenderScript fits into the Android architecture, how to build a RenderScript application, and when and where to use RenderScript.

RenderScript in many ways is a new paradigm for the Android platform. Although Android uses Java syntax and a virtual machine for developing applications, RenderScript is based on C99, a modern dialect of the C language. Furthermore, RenderScript is compiled down to native code on each device at runtime but is controlled by higher-level APIs running in the Android VM. This allows Android via RenderScript to provide developers a way to develop optimized high-performance code that is cross platform. This may seem extremely attractive, and many developers may be keen to write most of their applications in RenderScript, but RenderScript doesn’t replace or subsume development of Android apps in Java. There are both pros and cons to working with RenderScript.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial