Android.

Slides:



Advertisements
Similar presentations
Android on Legacy Devices It or Lose It?
Advertisements

Computer Graphics Tz-Huan Huang National Taiwan University (Slides are based on Prof. Chen’s)
G30™ A 3D graphics accelerator for mobile devices Petri Nordlund CTO, Bitboys Oy.
Building Apps with Graphics & Animation. Displaying Bitmaps Efficiently Loading Large Bitmaps Efficiently Caching Bitmaps Managing Bitmap Memory Displaying.
Charis Marangos. Games versus Most Applications  Technical implementation is hard Real-time and responsive (at least 25 frames per second) Hungry for.
Basic 2D Graphics in Android. Android Graphics Programming There are many ways to do graphics programming in Android – 2D vs. 3D – static vs. dynamic.
App Development on Android
Graphics & Animation in Android. Android rendering options The Canvas API Renderscript OpenGL wrappers NDK OpenGL
Introducing Longhorn. What is it? Longhorn is Microsoft’s “most important software release since Windows 95” – due for release 2006 What this talk covers.
Android Tutorial Android Written in Java Utilizes Dalvik VM – Just in time (JIT) compilation since Android 2.2.
Of Bytes, Cycles and Battery Life. Who am [2] [1]
This work is licensed under the Creative Commons Attribution 4.0 International License. To view a copy of this license, visit
Programming mobile devices Part II Programming Symbian devices with Symbian C++
Android Programming By Mohsen Biglari Android Programming, Part1: Introduction 1 Part1: Introduction By Mohsen Biglari.
G3D Design Goals C++ library of code common to every 3D project Write once, compile everywhere Safe and fast Prototype a game in one week Maximize flexibility.
What is Android NDK ● A toolset that lets you embed in you app native source code ● C, C++(recently supported December 2010) and assembly(?) ● It is supported.
Copyright© Jeffrey Jongko, Ateneo de Manila University Android.
Computer Graphics Graphics Hardware
GPUs and Accelerators Jonathan Coens Lawrence Tan Yanlin Li.
Interactive Time-Dependent Tone Mapping Using Programmable Graphics Hardware Nolan GoodnightGreg HumphreysCliff WoolleyRui Wang University of Virginia.
Roopa.T PESIT, Bangalore. Source and Credits Dalvik VM, Dan Bornstein Google IO 2008 The Dalvik virtual machine Architecture by David Ehringer.
Esri UC 2014 | Technical Workshop | Animating Thousands of Graphics with ArcGIS Runtime SDK for Java Mark Baird and Vijay Gandhi.
ROOT Team Meeting October 1 st 2010 GUI thinking and testing ideas OpenGL GUI Root Team meeting 01/10/2010.
به نام خدا تنظیم کننده : فرانه حدادی استاد : مهندس زمانیان تابستان 92.
GPU Architecture and Programming
Tone Mapping on GPUs Cliff Woolley University of Virginia Slides courtesy Nolan Goodnight.
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved Introduction to Android (Part.
Introduction to OpenGL  OpenGL is a graphics API  Software library  Layer between programmer and graphics hardware (and software)  OpenGL can fit in.
Android. Basic Architecture Linux Kernel Libraries Applications Android Runtime Application Framework.
 Installation of Android Development Environment  Creating the App with OpenGL ES API  Running the App on Emulator Android App Development.
GPU Based Sound Simulation and Visualization Torbjorn Loken, Torbjorn Loken, Sergiu M. Dascalu, and Frederick C Harris, Jr. Department of Computer Science.
Page 1 Computer Architecture and Organization 55:035 Midterm Exam Review Spring 2011.
ITP 109 Week 2 Trina Gregory Introduction to Java.
Basic 2D Graphics in Android. Android Graphics Programming There are many ways to do graphics programming in Android – 2D vs. 3D – static vs. dynamic.
By: Eliav Menachi.  Android custom 2D graphics library  OpenGL ES 1.0 for high performance 3D graphics.
Lecture 01: Computer Architecture overview. Our Goals ● Have a better understanding of computer architecture – Write better (more efficient) programs.
Introduction to Programming AP Computer Science. Computers What is a computer? –CPU –ALU –Memory –Hard Drive.
Computer Graphics (Fall 2003) COMS 4160, Lecture 5: OpenGL 1 Ravi Ramamoorthi Many slides courtesy Greg Humphreys.
Our Graphics Environment Landscape Rendering. Hardware  CPU  Modern CPUs are multicore processors  User programs can run at the same time as other.
Graphics & Animation Radan Ganchev Astea Solutions.
From VIC (VRVS) to ViEVO (EVO) 3 years of experiences with developing of video application VIC for VRVS allowed us to develop a new video application.
Computer Engg, IIT(BHU)
Computer Graphics Graphics Hardware
Unit 20 – Computer Game Platforms & Technology – Software Technology
Computer Architecture & Operations I
INFO 448: Android Development
Lecture 3: Animation & Graphics
Graphics & Animation in Android
Modeling Big Data Execution speed limited by: Model complexity
Current Generation Hypervisor Type 1 Type 2.
Introducing OpenShot Library
Lecture 3: Animation & Graphics
Lecture 8: Graphics By: Eliav Menachi.
The heavyweight parts of lightweight languages
Development-Introduction
Spatial Analysis With Big Data
Introduction Enosis Learning.
David Huggins-Daines Sphinx on Handhelds David Huggins-Daines
Introduction Enosis Learning.
Introduction to Computer Graphics with WebGL
Unit 20 Software Part 2.
A Survey on Virtualization Technologies
Unit 20 Software Part 2.
3D applications in Delphi
Android Developer Fundamentals V2
Computer Graphics Graphics Hardware
Lecture 3: Animation & Graphics
OS Simulator Develop and test embedded applications on Windows or Linux host environments Eliminates the need for the original OS and expensive.
Lecture 8: Graphics By: Eliav Menachi.
CPU Structure CPU must:
Presentation transcript:

Android

Android Drawing on Android: Canvas vs. OpenGL Bitmap vs. Texture NDK: Native Development Kit

Canvas Canvas.drawLine(), drawRect(), etc. Canvas.setMatrix(m); Canvas.setBitmap(bmp); View.onDraw(Canvas);

Bitmap Bitmap.createBitmap(width, height, config); BitmapFactory.decodeFile(file, options); With or without alpha channel (transparency).

View: events & invalidation onDraw(canvas) invalidate() → onDraw() onTouchEvent() → invalidate()

PixelFormat RGB_565 (2 bytes / pixel) ARGB_8888 (4 bytes / pixel) Bitmap.Config getWindow().setFormat() PixelFormat.RGBA_8888

Dithering

Canvas Not hardware accelerated (CPU) Uses Bitmap for images Rendering in UI thread, invalidate() model Fast scrolling Slow zooming, rotation, 3d projections

OpenGL ES Hardware accelerated (GPU) Uses Textures for images Rendering in separate thread (not UI thread) Fast zooming, 3d projections Fragmentation, complexity, hard to debug

Bitmap vs. Texture Bitmaps: use Java heap, limited to 24MB. 4bytes/pixel (ARGB) Textures: use native memory, limited only by total RAM. can use 3bytes/pixel (RGB). support pixmaps. may use fast GPU memory.

Native Development Kit (NDK)

Native Development Kit (NDK) JNI: Java Native Interface C, C++ GCC 4.4.3 cross compiler STL, exceptions, RTTI arm-linux-gnueabi, RISC, little endian, 32bit Thumb or ARM instructions Without hardware floating point

Why use NDK Performance critical code, e.g. FFT, game physics library, image/sound processing. Performance: avoid Java object creation and GC, e.g. filesystem scan. Use existing non-Java code/libraries (e.g. Python interpreter in C).

Java Native Interface (JNI) class Hello { public native static int sum(int[] data); static { System.loadLibrary(“hello”); }

JNI C++ code JNI book

Stable APIs C library Math library Zlib OpenGL ES 1.x & 2.0 OpenSL ES Android Log Bitmap interface (jnigraphics) Android native application API

NDK and Market Native code compiled for multiple architectures in a single APK. Market does filtering based on architectures available in APK and on platform version.

Thank you