Java fx on raspberry pi gerrit grunwald

Post on 10-May-2015

642 views 8 download

Tags:

Transcript of Java fx on raspberry pi gerrit grunwald

Gerrit Grunwald !!!!

canoo Engineering AG

TWITTER: @hansolo_ WEB: harmonic-code.org

first...

what embedded

IS...

the point of view

...depends on

Hardware

Developer

Software

Developer

JAVA ONE 2012

KioskJavaFX

powe

red

running on...

BoardPanda

CPU : ARM A9 DualCore Clock: 1.2 GHz Ram : 1 GB GPU : Power VR SGX540

Question...

Why Java?

Benefits of Java★ Superb developer toolchain ★ Mature, fast, widespread ★ Thousands of libraries ★ Huge community ★ No standard on embedded

Ok but...

JavaFX

WTF ?

Possible

USECASES5

★Home automation

★Home entertainment

★Medical devices

★ Information Kiosks

★Education

EMBEDDED ?WHAT IS JAVAFX ON

A Subset of

JAVAF X

Without support for

★ Swing/SWT ★ System Menu ★ Drag'n Drop ★ WebView ★ Media (e.g. AudioClip)

Available JDK's

★JDK 7 (JFX 2)* ★JDK 8 (JFX 8)

11/2013

*dev. prev. from 2012

Target* footprint

MIN ~16 MB

*~32 MB today

PLATFORMS ?WHAT ARE THE SUPPORTED

11/2013

BeagleBoard xM

!

!

Raspberry Pi

xMBeagleBoard

★ ARM A8, 1 GHz ★ 512 MB RAM ★ 4 x USB ★ ETHERNET RJ45 ★ HDMI ★ I2C, JTAG, SPI

running on

Ångströmbased on Debian

xMBeagleBoard

JDK 7 JavaFX 2

dev. preview of 2012 with SoftFloat support

PiRaspberry

★ ARM v6, 700 MHz ★ 512 MB RAM ★ 2 x USB ★ ETHERNET RJ45 ★ HDMI, COMPOSITE ★ GPIO, I2C, UART, SPI

running on

Raspbianbased on Debian

PiRaspberry

JDK 8 JavaFX 8

weekly dev. preview with HardFloat support

A typical

Setup

PiRaspberry

70$

PiRaspberry

220$

JavaSo...having

means...

ANYWHEREWRITE ONCE RUN ?

SOMEFACTS

FIRST...

Intel i7 Quadcore 2.3 GHz

16 GB ram

Nvidia GeForce GT 650m

ARM A8 1 Ghz

512 MB ram

Power VR SGX series 5

Macbook Pro BeagleBoard xM

Nvidia GeForce GT 650m

Power VR SGX series 5

Macbook Pro BeagleBoard xM

★ 384 Cores ★ ~15 GPixel/s ★ ~600 GFlops

★ 1 Core ★ ~500 MPixel/s ★ ~1.6 GFlops

REQUIREMENTSEmbedded

Requirements

★ touchable user interface ★ reasonable controls ★ no mouse and keyboard ★ restriced screen estate

CONCLUSION

ANYWHEREWRITE ONCE RUN!NO

RECYCLE A LOTBut you can

FROM MOBILEand learn

60 cm 50 mm90 m

m

34 cm

Some words about

Graphics

The Scene Graph

Root

LeafBranch Branch

Leaf Branch Leaf Leaf Branch

Node

Retained Mode

Rendering

SPEED LIMIT

60

The Scene Graph★ Each node is about 5-7 kb ★ Desktop could handle up to

100000 nodes ★ Embedded devices can

handle up to 1000 nodes !!!

But what does it

mean ?

To visualize

Data…

do we need this ?

isn't this enough ?

or what about this

or even this...

CONTENT

IT'S ABOUT

OVER CHROME

But why is it

important ?

3 Nodes

CHROMECONTENT

245 Nodes

3 Nodes

COMPROMISE 1CONTENT

33 Nodes

3 Nodes

COMPROMISE 2CONTENT

16 Nodes

3 Nodes

COMPROMISE 3CONTENT

6 Nodes

BETTER AVOIDThings you

Things to avoid

★ huge amount of nodes ★ intense use of animations ★ intense use of effects ★ many overlapping nodes ★ memory intense operations

Some UI

Examples

Example UI (200 nodes)

Example UI (100 nodes)

Example UI (60 nodes)

Conclusion

really rocks...JAVA(FX) ON EMBEDDED

Demo