Re: JAVAFX on ANDROID

2013-10-14 Thread Tobi
I absolutely agree. The point is: nobody can expect from oracle to build such a 
vm. But if they won't do it, JavaFX will die. Even in the embedded space where 
companies will use QT or HTML5 instead. Without license fees So to sell 
JavaFX for embedded devices oracle MUST support mobile platforms via VM too. 

Von meinem iPhone gesendet

 Am 14.10.2013 um 07:09 schrieb Tom Eugelink t...@tbee.org:
 
 
 On 2013-10-14 01:06, Rafal wrote:
 If you honestly encourage community to make a such big effort as developing, 
 adjusting and maintaining JVMs on the two leading mobile platforms, you 
 don't have any plans that Oracle VM on android will be released in the next 
 2 years. :/
 Otherwise, if Oracle announce own VM, then all this community's effort be 
 for nothing and pointless.
 
 Open source done in the spare time by people with a full time job usually 
 never grows much bigger than a nice but not too complex library; layout 
 engines, testing frameworks, a web framework, that kind of stuff. Because as 
 a project grows in size and complexity, so do the (number of) issues and the 
 time required to provide support. That usually is the point where either a 
 company is started (projects like Maven and Gradle) or the project gets 
 corporate funding usually by that a corporation allows some developers to 
 spent worktime on it (Apache, Eclipse, and Java  JavaFX is getting there).
 
 A full fledged port of a JVM to a mobile platform cannot be carried in spare 
 time, it can be showcased (which it has), but to make it production worthy 
 one or more corporations needs to put their weight behind it.
 
 My 2 cents,
 
 Tom
 


Re: JAVAFX on ANDROID

2013-10-14 Thread Matthias Hänel
Hey Tom,


thanks for you answer.

while the OSX font stuff is there and Orcale's goal is to use the native font 
renderer on each platform.
I am sure there must be some kind of an Android font renderer in the code. I 
couldn't find one until now.

Another question: Since I ported you latest jfx78 to Java6 it's now jfx678 ;) 
What would be the best
way to contribute the port? Do you think it's good to contribute it to jfx78 or 
to have a separate
jfx68 branch?


regards
Matthias



Am 11.10.2013 um 18:22 schrieb Tom Schindl tom.schi...@bestsolution.at:

 On 11.10.13 18:10, Matthias Hänel wrote:
 Hi Tomas,
 
 
 today, I took the time to investigate a little more time on this. 
 
 1. I build an entirely new openjfx78 build for android
 2. starting this gave me several errors that lead me to the 
 conclusion that I need a java6 openjfx
 3. based on openjfx78 I ported it back to java6 (adapted gradled scripts, 
 and tons of java source code)
 4. Now it's almost running on an 18th android. All libraries are firing up 
 until the CssStyleHelper 
 is called with a static call to createStyleHelper.
 
 That looks like the font stuff is not in jfx78. That's why new Font 
 returns with null and therefore
 
 On OS-X font stuff is definately there in jfx78, but the low-level font
 stuff is loaded using reflection (at least this was the cause on robovm)!
 
 Tom



Re: JAVAFX on ANDROID

2013-10-14 Thread Matthias Hänel
Hi Richard,


thanks for your fast answer.


Am 11.10.2013 um 18:53 schrieb Richard Bair richard.b...@oracle.com:

 As frustrating as it is, the fact is that today Oracle has no announced plans 
 to release any official JVM for Android and iOS. That being the case, the 
 biggest hurdle to getting FX on iOS and Android is the VM. On the iOS side 
 there has been some success with RoboVM. On Android you can just use Dalvik 
 if you back port to Java 6, or you have to find another VM (XMLVM maybe?? 
 Anybody convince Excelsior to support Android?) that can do the job.

The main point of irritation comes from an quite unclear position about 
providing the JVM and JFX of the Java-platform. 
That's why I will sumarize what I heard between the lines:

1. there is NO official jvm planned for iOS and Android in the near future.
2. jfx8 is beeing officially maintained until some point for iOS and Android 
but the actual port is left to the open source community.
3. Linux ARM support is beeing focused officially on the Freescale ARM-platform.

our conclusion is:
1. that's not that bad anymore since we have RoboVM for iOS and Davlik on 
Android.
2. this statement should have been made 1 year ago. Probably, I missed it but 
it was not clear to my team as well until last week.
   That's why we took the challenge to do it our selves.
3. This is good for the open source development since we probably can rely on 
the CPU optimized parts for ARM.



 There are two parts the problem of a VM. One is the VM technology itself, 
 which is probably the lesser of the two issues because there are a handful of 
 decent VMs around (if you include Dalvik, you've already got one on Android). 
 The second problem are the class libraries. Generally JavaFX doesn't rely on 
 too much from JavaSE beyond what is in the base module; threading and 
 collections and concurrency and so forth. However we are using the diamond 
 operator and in a few places we might use multi-catch (although I don't know 
 of such places myself) and definitely we use default methods in interfaces in 
 one location (ObservableList). Generally we've tried to make it easy to back 
 port to 7, but haven't tried to keep 6 up to date. I would be very interested 
 in the list of code changes Matthias had to make to better understand the 
 situation.


Yes, mainly it was the multi-catch stuff and the diamonds and some default 
methods. It's still enough to maintain ;)


 As far as fonts (from Matthias' email) I believe the Android port currently 
 uses T2K but Felipe and Tomas were talking about using the new Font support 
 which would delegate directly to Android APIs. This might be one area that 
 Matthias' and Felipe and Tomas can work closely on to get a contribution to 
 make this happen!

I have seen T2K in the ARM-Linux port but it's not in the sources since it's 
one of the libraries that are still in the closed parts of OpenJFX.

Is there a fallback? Pango doesn't work either it's not used in the android 
gradle scripts. 
I would be happy to integrate it and I am sure I can compile pango for android. 
I just need a pointer to how I can integrate it into the build process.
I changed android.gradle but I am not sure where to put the pango sources.



 How much time do you think it would take community designers to develop this?
 
 RoboVM for iOS I think is basically at this stage, where they've got 
 something up and running to the point of being able to do performance 
 analysis and looking for bugs. It has been a several month process with stops 
 and starts. Tom and the others working on RoboVM might be able to give a 
 better estimate.
 
 Does it support swing and javafx or just javafx like the Pi port? What parts 
 of java8 don't work on your standalone VM?
 
 I couldn't tell you what does / doesn't work on the standalone VM as that 
 would break all kinds of confidential legal mumbo-jumbo. But I can tell you 
 I've never seen a port of AWT to iOS or Android.




kind regards
Matthias




Re: JAVAFX on ANDROID

2013-10-14 Thread Matthias Hänel
Hi Stefan,


thanks for your fast answer.


Am 12.10.2013 um 00:47 schrieb Stefan Fuchs snfu...@gmx.de:

 I think you must |add the flag ||-PCOMPILE_PANGO=true to build the new 
 opensource font stuff.

I am sure that's not that easy ;)
Actually, I tried it but it didn't do anything in the first place.


 If I remember correctly I got a similar error, when I first build jfx78 on 
 linux.
 
 I made some experiments with javafx on android by myself.
 
 I found the following interesting read:
 http://stackoverflow.com/questions/7153989/java-7-language-features-with-android

Well, I didn't use jfx78 vanilla, I used it as a base for the port to java6.
I am quite sure that we need a java6 port on the long run to support davlik 
stable.


 One other problem I hit, when trying to compile a larger application was:
 http://stackoverflow.com/questions/15508477/android-my-application-is-too-large-and-gives-unable-to-execute-dex-method-id

Ok, interessting, I'll take a look at it when I hit the error.


 Apparently there is a limit of ||65536 methods per apk file.
 
 
 Besides, I'm currently two releases behind with the jfx78.
 
 I'll try to catch up soon.

It would be great to read your findings.


kind regards
Matthias





Re: JAVAFX on ANDROID

2013-10-14 Thread Matthias Hänel
Hi Felie,


thanks for you fast answer.


Am 12.10.2013 um 01:36 schrieb Felipe Heidrich felipe.heidr...@oracle.com:

 The 'native' font stack for Linux uses Pango (to handle complex text) and 
 freetype (rendering glyph images, outlines, metrics, etc).
 
 As long as we manage to build our freetype code on Android we should be able 
 to have something that works.
 
 As for pango, I heard it is not available on Android, but JavaFX should be 
 able to work without it (except that Arabic, Hebrew, Thai, Indic and other 
 complex scripts won't work).
 For the long run I would like to implement our glyph-layout code based on 
 Harfbuzz, which is would replace pango entirely and is available on Android.

As far as I can see freetype and pango are conntected to each other in the 
linux implementation. It's not yet possible to compile just freetype without
pango and the other way around.

Just an idea. Shouldn't it be possible to have javafx running by default when 
the font renderer is not working?
Most applications don't need a very fancy font renderer, many could rely on any 
software fallback. Don't you think so?


kind regards
Matthias





Re: JAVAFX on ANDROID

2013-10-14 Thread Matthias Hänel
Hi Tomas,


thanks for your fast answer.


Am 12.10.2013 um 14:04 schrieb Tomas Brandalik tomas.branda...@oracle.com:

 I think that PlatformLogger initialization in CssHelper was causing problems. 
 I had to write one.

I took the compat library fro robovm. I believe this should be sufficient. But 
the CssStyleHelper was still causing problems.

 Not 100% sure though I will look at it when I'm back in the office. (Or you 
 can comment out css processing in the node.) I was able to run without font 
 then.

Commenting out Css processing in the node is a good I idea which I tried 
yesterday but the I ran into other errors 
that will be caused by the same reason front is missing.

I would be great, I you could give me a direction for further investigation.


regards
Matthias






Re: JAVAFX on ANDROID

2013-10-14 Thread Matthias Hänel
Hey Niklas,


Am 13.10.2013 um 11:49 schrieb Niklas Therning nik...@therning.org:

 For PlatformLogger et al you can probably use the compatibility lib we have
 been using for jfx78+RoboVM: https://github.com/robovm/robovm-jfx78-compat

Hehe, yes I read it in Tobi's blog post that you wrote one that's why this is 
what I did in the first place ;)


regards
Matthias

Re: JAVAFX on ANDROID

2013-10-14 Thread Niklas Therning
I don't think a Java6 backport is necessary. If the jfx78 backport works on
RoboVM it should work on Android (provided that the native stuff is there
of course). The problem is the dx tool which doesn't accept Java7 .class
files, right?

IIUC not much happened to the class file format between Java6 and Java7
(except for invokedynamic and what is need to support it but Java7's javac
never generates invokedynamic ops). The APIs to support try-with-resources
(AutoCloseable) is already in Android and the syntactic sugar added in
Java7 (multi-catch, switch on string, diamond, etc) compiles to Java6
compatible bytecode and uses no new APIs. So it should be easy to make a
tool using ASM or similar which takes the jfx78 jar file and rewrites the
.class files in it to target 1.6 instead of 1.7 and repackage as a new jar.

Just my €0.02. If you want to maintain a backport of the backport :-) then
go for it.


On Mon, Oct 14, 2013 at 8:53 AM, Matthias Hänel hae...@ultramixer.comwrote:

 Hi Stefan,


 thanks for your fast answer.


 Am 12.10.2013 um 00:47 schrieb Stefan Fuchs snfu...@gmx.de:

  I think you must |add the flag ||-PCOMPILE_PANGO=true to build the new
 opensource font stuff.

 I am sure that's not that easy ;)
 Actually, I tried it but it didn't do anything in the first place.


  If I remember correctly I got a similar error, when I first build jfx78
 on linux.
 
  I made some experiments with javafx on android by myself.
 
  I found the following interesting read:
 
 http://stackoverflow.com/questions/7153989/java-7-language-features-with-android

 Well, I didn't use jfx78 vanilla, I used it as a base for the port to
 java6.
 I am quite sure that we need a java6 port on the long run to support
 davlik stable.


  One other problem I hit, when trying to compile a larger application was:
 
 http://stackoverflow.com/questions/15508477/android-my-application-is-too-large-and-gives-unable-to-execute-dex-method-id

 Ok, interessting, I'll take a look at it when I hit the error.


  Apparently there is a limit of ||65536 methods per apk file.
 
 
  Besides, I'm currently two releases behind with the jfx78.
 
  I'll try to catch up soon.

 It would be great to read your findings.


 kind regards
 Matthias






Re: JAVAFX on ANDROID

2013-10-14 Thread Matthias Hänel
Hi Tomas,


since Tobi told me he had a similiar problem in the first place with the iOS 
port and he managed to run JFX8 without font.
We deactivated fonts. There is some code to deactivate and after that it looks 
like it is starting the JFX-Application.

10-14 06:06:49.529: INFO/GLASS(1546): glass_view_drawBegin
10-14 06:06:49.529: INFO/javafx(1546): Using getAndroidNativeWindow() from 
glass.
10-14 06:06:49.579: ERROR/libEGL(1546): called unimplemented OpenGL ES API
10-14 06:06:49.579: ERROR/libEGL(1546): called unimplemented OpenGL ES API
10-14 06:06:49.579: ERROR/libEGL(1546): called unimplemented OpenGL ES API
10-14 06:06:49.579: ERROR/libEGL(1546): called unimplemented OpenGL ES API
10-14 06:06:49.579: ERROR/javafx(1546): Some video driver error or programming 
error occurred. Framebuffer object status is invalid. (FBO - 823)
10-14 06:06:49.579: ERROR/libEGL(1546): called unimplemented OpenGL ES API
10-14 06:06:49.579: ERROR/javafx(1546): Error creating framebuffer object with 
TexID 1)
10-14 06:06:49.599: ERROR/libEGL(1546): called unimplemented OpenGL ES API
10-14 06:06:49.649: ERROR/libEGL(1546): called unimplemented OpenGL ES API
10-14 06:06:49.649: ERROR/libEGL(1546): called unimplemented OpenGL ES API
10-14 06:06:49.649: ERROR/libEGL(1546): called unimplemented OpenGL ES API
10-14 06:06:49.649: ERROR/libEGL(1546): called unimplemented OpenGL ES API
10-14 06:06:49.649: ERROR/libEGL(1546): called unimplemented OpenGL ES API
10-14 06:06:49.649: ERROR/libEGL(1546): called unimplemented OpenGL ES API
10-14 06:06:49.659: WARN/System.err(1546): 
java.lang.reflect.InvocationTargetException
10-14 06:06:49.669: WARN/System.err(1546): at 
java.lang.reflect.Method.invokeNative(Native Method)
10-14 06:06:49.669: WARN/System.err(1546): at 
java.lang.reflect.Method.invoke(Method.java:525)
10-14 06:06:49.709: DEBUG/dalvikvm(1546): GC_FOR_ALLOC freed 330K, 10% free 
4129K/4564K, paused 32ms, total 32ms
10-14 06:06:49.709: WARN/System.err(1546): at 
com.sun.prism.es2.ES2ResourceFactory.createStockShader(ES2ResourceFactory.java:253)
10-14 06:06:49.709: WARN/System.err(1546): at 
com.sun.prism.impl.ps.BaseShaderContext.getPaintShader(BaseShaderContext.java:227)
10-14 06:06:49.709: WARN/System.err(1546): at 
com.sun.prism.impl.ps.BaseShaderContext.validatePaintOp(BaseShaderContext.java:485)
10-14 06:06:49.709: WARN/System.err(1546): at 
com.sun.prism.impl.ps.BaseShaderContext.validatePaintOp(BaseShaderContext.java:418)
10-14 06:06:49.709: WARN/System.err(1546): at 
com.sun.prism.impl.ps.BaseShaderContext.validatePaintOp(BaseShaderContext.java:351)
10-14 06:06:49.709: WARN/System.err(1546): at 
com.sun.prism.impl.BaseContext.validateClearOp(BaseContext.java:116)
10-14 06:06:49.709: WARN/System.err(1546): at 
com.sun.prism.es2.ES2Graphics.clear(ES2Graphics.java:78)
10-14 06:06:49.719: WARN/System.err(1546): at 
com.sun.javafx.tk.quantum.ViewPainter.doPaint(ViewPainter.java:460)
10-14 06:06:49.719: WARN/System.err(1546): at 
com.sun.javafx.tk.quantum.ViewPainter.paintImpl(ViewPainter.java:331)
10-14 06:06:49.719: WARN/System.err(1546): at 
com.sun.javafx.tk.quantum.PresentingPainter.run(PresentingPainter.java:88)
10-14 06:06:49.719: WARN/System.err(1546): at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:390)
10-14 06:06:49.729: WARN/System.err(1546): at 
java.util.concurrent.FutureTask.runAndReset(FutureTask.java:276)
10-14 06:06:49.729: WARN/System.err(1546): at 
com.sun.javafx.tk.RenderJob.run(RenderJob.java:58)
10-14 06:06:49.729: WARN/System.err(1546): at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
10-14 06:06:49.729: WARN/System.err(1546): at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
10-14 06:06:49.729: WARN/System.err(1546): at 
com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:129)
10-14 06:06:49.729: WARN/System.err(1546): at 
java.lang.Thread.run(Thread.java:841)
10-14 06:06:49.729: WARN/System.err(1546): Caused by: 
java.lang.RuntimeException: Error creating vertex shader
10-14 06:06:49.740: WARN/System.err(1546): at 
com.sun.prism.es2.ES2Shader.createFromSource(ES2Shader.java:132)
10-14 06:06:49.740: WARN/System.err(1546): at 
com.sun.prism.es2.ES2Shader.createFromSource(ES2Shader.java:173)
10-14 06:06:49.740: WARN/System.err(1546): at 
com.sun.prism.es2.ES2ResourceFactory.createShader(ES2ResourceFactory.java:168)
10-14 06:06:49.749: WARN/System.err(1546): at 
com.sun.prism.shader.Texture_Color_Loader.loadShader(Texture_Color_Loader.java:47)
10-14 06:06:49.749: WARN/System.err(1546): ... 19 more
10-14 06:06:49.749: WARN/System.err(1546): java.lang.InternalError: Error 
loading stock shader Texture_Color
10-14 06:06:49.749: WARN/System.err(1546): at 
com.sun.prism.es2.ES2ResourceFactory.createStockShader(ES2ResourceFactory.java:256)
10-14 06:06:49.759: WARN/System.err(1546): at 
com.sun.prism.impl.ps.BaseShaderContext.getPaintShader(BaseShaderContext.java:227)
10-14 

Re: JAVAFX on ANDROID

2013-10-14 Thread Matthias Hänel
Hi Tomas,


never mind, I found the problem over here in the simulator ;) I had to activate 
the GPU support.

So, now I had to BGRA image format for Android and now I get JFX up and running 
without fonts.

There are two things missing:
1. fonts- here we probably need to get pango working for Android right?
2. touch events - I saw that you have got a special Android proxy for the input 
stuff 
Java_com_oracle_dalvik_FXActivity_00024InternalSurfaceView_onTouchEventNative
This seems to crash for some reason. any idea? It's not that complicated but it 
is producing a stack trace.

After fixing the touch events Brickbreaker with Niklas' no-font-patch should 
work. I'd pleased to test this.


kind regards
Matthias



Am 14.10.2013 um 12:17 schrieb Matthias Hänel hae...@ultramixer.com:

 Hi Tomas,
 
 
 since Tobi told me he had a similiar problem in the first place with the iOS 
 port and he managed to run JFX8 without font.
 We deactivated fonts. There is some code to deactivate and after that it 
 looks like it is starting the JFX-Application.
 
 10-14 06:06:49.529: INFO/GLASS(1546): glass_view_drawBegin
 10-14 06:06:49.529: INFO/javafx(1546): Using getAndroidNativeWindow() from 
 glass.
 10-14 06:06:49.579: ERROR/libEGL(1546): called unimplemented OpenGL ES API
 10-14 06:06:49.579: ERROR/libEGL(1546): called unimplemented OpenGL ES API
 10-14 06:06:49.579: ERROR/libEGL(1546): called unimplemented OpenGL ES API
 10-14 06:06:49.579: ERROR/libEGL(1546): called unimplemented OpenGL ES API
 10-14 06:06:49.579: ERROR/javafx(1546): Some video driver error or 
 programming error occurred. Framebuffer object status is invalid. (FBO - 823)
 10-14 06:06:49.579: ERROR/libEGL(1546): called unimplemented OpenGL ES API
 10-14 06:06:49.579: ERROR/javafx(1546): Error creating framebuffer object 
 with TexID 1)
 10-14 06:06:49.599: ERROR/libEGL(1546): called unimplemented OpenGL ES API
 10-14 06:06:49.649: ERROR/libEGL(1546): called unimplemented OpenGL ES API
 10-14 06:06:49.649: ERROR/libEGL(1546): called unimplemented OpenGL ES API
 10-14 06:06:49.649: ERROR/libEGL(1546): called unimplemented OpenGL ES API
 10-14 06:06:49.649: ERROR/libEGL(1546): called unimplemented OpenGL ES API
 10-14 06:06:49.649: ERROR/libEGL(1546): called unimplemented OpenGL ES API
 10-14 06:06:49.649: ERROR/libEGL(1546): called unimplemented OpenGL ES API
 10-14 06:06:49.659: WARN/System.err(1546): 
 java.lang.reflect.InvocationTargetException
 10-14 06:06:49.669: WARN/System.err(1546): at 
 java.lang.reflect.Method.invokeNative(Native Method)
 10-14 06:06:49.669: WARN/System.err(1546): at 
 java.lang.reflect.Method.invoke(Method.java:525)
 10-14 06:06:49.709: DEBUG/dalvikvm(1546): GC_FOR_ALLOC freed 330K, 10% free 
 4129K/4564K, paused 32ms, total 32ms
 10-14 06:06:49.709: WARN/System.err(1546): at 
 com.sun.prism.es2.ES2ResourceFactory.createStockShader(ES2ResourceFactory.java:253)
 10-14 06:06:49.709: WARN/System.err(1546): at 
 com.sun.prism.impl.ps.BaseShaderContext.getPaintShader(BaseShaderContext.java:227)
 10-14 06:06:49.709: WARN/System.err(1546): at 
 com.sun.prism.impl.ps.BaseShaderContext.validatePaintOp(BaseShaderContext.java:485)
 10-14 06:06:49.709: WARN/System.err(1546): at 
 com.sun.prism.impl.ps.BaseShaderContext.validatePaintOp(BaseShaderContext.java:418)
 10-14 06:06:49.709: WARN/System.err(1546): at 
 com.sun.prism.impl.ps.BaseShaderContext.validatePaintOp(BaseShaderContext.java:351)
 10-14 06:06:49.709: WARN/System.err(1546): at 
 com.sun.prism.impl.BaseContext.validateClearOp(BaseContext.java:116)
 10-14 06:06:49.709: WARN/System.err(1546): at 
 com.sun.prism.es2.ES2Graphics.clear(ES2Graphics.java:78)
 10-14 06:06:49.719: WARN/System.err(1546): at 
 com.sun.javafx.tk.quantum.ViewPainter.doPaint(ViewPainter.java:460)
 10-14 06:06:49.719: WARN/System.err(1546): at 
 com.sun.javafx.tk.quantum.ViewPainter.paintImpl(ViewPainter.java:331)
 10-14 06:06:49.719: WARN/System.err(1546): at 
 com.sun.javafx.tk.quantum.PresentingPainter.run(PresentingPainter.java:88)
 10-14 06:06:49.719: WARN/System.err(1546): at 
 java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:390)
 10-14 06:06:49.729: WARN/System.err(1546): at 
 java.util.concurrent.FutureTask.runAndReset(FutureTask.java:276)
 10-14 06:06:49.729: WARN/System.err(1546): at 
 com.sun.javafx.tk.RenderJob.run(RenderJob.java:58)
 10-14 06:06:49.729: WARN/System.err(1546): at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
 10-14 06:06:49.729: WARN/System.err(1546): at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
 10-14 06:06:49.729: WARN/System.err(1546): at 
 com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:129)
 10-14 06:06:49.729: WARN/System.err(1546): at 
 java.lang.Thread.run(Thread.java:841)
 10-14 06:06:49.729: WARN/System.err(1546): Caused by: 
 java.lang.RuntimeException: Error creating vertex shader
 10-14 06:06:49.740: WARN/System.err(1546): at 
 

hg: openjfx/8/graphics/rt: RT-23861: Mac: Check: use NewGlobalRef when caching jclass

2013-10-14 Thread hang . vo
Changeset: 2ba9e3de19a0
Author:Anthony Petrov anthony.pet...@oracle.com
Date:  2013-10-14 15:52 +0400
URL:   http://hg.openjdk.java.net/openjfx/8/graphics/rt/rev/2ba9e3de19a0

RT-23861: Mac: Check: use NewGlobalRef when caching jclass
Reviewed-by: art, kcr, pchelko

! modules/graphics/src/main/native-glass/mac/GlassCursor.m
! modules/graphics/src/main/native-glass/mac/GlassHelper.m
! modules/graphics/src/main/native-glass/mac/GlassMenu.m
! modules/graphics/src/main/native-glass/mac/GlassView.m
! modules/graphics/src/main/native-glass/mac/GlassWindow.m



Re: JAVAFX on ANDROID

2013-10-14 Thread tomas.brandalik

Hi Matthias,
cool, I'm surprised you we're able to run it on emulator. I run on 
device not on emulator for a long time. There wasn't  opengl extension 
GL_EXT_texture_format_BGRA in emulator. But that could have changed 
overtime.
Regarding events: yes there seems to be a problem which I haven't 
discovered. I've pushed multitouch support and broke touch events on 
dalvik. I will fix that soon.
In order to replace t2k there is freetype library for fonts and glyphs 
access and harfbuzz for layouting available among system libraries.  
Although google discourages to use them since they aren't part of public 
api. It can bring all sorts of compatibility problems (harfbuzz 
implementation has changed in recent android releases for example). Yes 
try pango if you have time to spare and share results please.


good luck
-Tomas

On 10/14/2013 01:45 PM, Matthias Hänel wrote:

Hi Tomas,


never mind, I found the problem over here in the simulator ;) I had to activate 
the GPU support.

So, now I had to BGRA image format for Android and now I get JFX up and running 
without fonts.

There are two things missing:
1. fonts- here we probably need to get pango working for Android right?
2. touch events - I saw that you have got a special Android proxy for the input 
stuff 
Java_com_oracle_dalvik_FXActivity_00024InternalSurfaceView_onTouchEventNative
This seems to crash for some reason. any idea? It's not that complicated but it 
is producing a stack trace.

After fixing the touch events Brickbreaker with Niklas' no-font-patch should 
work. I'd pleased to test this.


kind regards
Matthias



Am 14.10.2013 um 12:17 schrieb Matthias Hänel hae...@ultramixer.com:


Hi Tomas,


since Tobi told me he had a similiar problem in the first place with the iOS 
port and he managed to run JFX8 without font.
We deactivated fonts. There is some code to deactivate and after that it looks 
like it is starting the JFX-Application.

10-14 06:06:49.529: INFO/GLASS(1546): glass_view_drawBegin
10-14 06:06:49.529: INFO/javafx(1546): Using getAndroidNativeWindow() from 
glass.
10-14 06:06:49.579: ERROR/libEGL(1546): called unimplemented OpenGL ES API
10-14 06:06:49.579: ERROR/libEGL(1546): called unimplemented OpenGL ES API
10-14 06:06:49.579: ERROR/libEGL(1546): called unimplemented OpenGL ES API
10-14 06:06:49.579: ERROR/libEGL(1546): called unimplemented OpenGL ES API
10-14 06:06:49.579: ERROR/javafx(1546): Some video driver error or programming 
error occurred. Framebuffer object status is invalid. (FBO - 823)
10-14 06:06:49.579: ERROR/libEGL(1546): called unimplemented OpenGL ES API
10-14 06:06:49.579: ERROR/javafx(1546): Error creating framebuffer object with 
TexID 1)
10-14 06:06:49.599: ERROR/libEGL(1546): called unimplemented OpenGL ES API
10-14 06:06:49.649: ERROR/libEGL(1546): called unimplemented OpenGL ES API
10-14 06:06:49.649: ERROR/libEGL(1546): called unimplemented OpenGL ES API
10-14 06:06:49.649: ERROR/libEGL(1546): called unimplemented OpenGL ES API
10-14 06:06:49.649: ERROR/libEGL(1546): called unimplemented OpenGL ES API
10-14 06:06:49.649: ERROR/libEGL(1546): called unimplemented OpenGL ES API
10-14 06:06:49.649: ERROR/libEGL(1546): called unimplemented OpenGL ES API
10-14 06:06:49.659: WARN/System.err(1546): 
java.lang.reflect.InvocationTargetException
10-14 06:06:49.669: WARN/System.err(1546): at 
java.lang.reflect.Method.invokeNative(Native Method)
10-14 06:06:49.669: WARN/System.err(1546): at 
java.lang.reflect.Method.invoke(Method.java:525)
10-14 06:06:49.709: DEBUG/dalvikvm(1546): GC_FOR_ALLOC freed 330K, 10% free 
4129K/4564K, paused 32ms, total 32ms
10-14 06:06:49.709: WARN/System.err(1546): at 
com.sun.prism.es2.ES2ResourceFactory.createStockShader(ES2ResourceFactory.java:253)
10-14 06:06:49.709: WARN/System.err(1546): at 
com.sun.prism.impl.ps.BaseShaderContext.getPaintShader(BaseShaderContext.java:227)
10-14 06:06:49.709: WARN/System.err(1546): at 
com.sun.prism.impl.ps.BaseShaderContext.validatePaintOp(BaseShaderContext.java:485)
10-14 06:06:49.709: WARN/System.err(1546): at 
com.sun.prism.impl.ps.BaseShaderContext.validatePaintOp(BaseShaderContext.java:418)
10-14 06:06:49.709: WARN/System.err(1546): at 
com.sun.prism.impl.ps.BaseShaderContext.validatePaintOp(BaseShaderContext.java:351)
10-14 06:06:49.709: WARN/System.err(1546): at 
com.sun.prism.impl.BaseContext.validateClearOp(BaseContext.java:116)
10-14 06:06:49.709: WARN/System.err(1546): at 
com.sun.prism.es2.ES2Graphics.clear(ES2Graphics.java:78)
10-14 06:06:49.719: WARN/System.err(1546): at 
com.sun.javafx.tk.quantum.ViewPainter.doPaint(ViewPainter.java:460)
10-14 06:06:49.719: WARN/System.err(1546): at 
com.sun.javafx.tk.quantum.ViewPainter.paintImpl(ViewPainter.java:331)
10-14 06:06:49.719: WARN/System.err(1546): at 
com.sun.javafx.tk.quantum.PresentingPainter.run(PresentingPainter.java:88)
10-14 06:06:49.719: WARN/System.err(1546): at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:390)
10-14 06:06:49.729: 

Re: JAVAFX on ANDROID

2013-10-14 Thread Matthias Hänel
Hi Tomas,


Am 14.10.2013 um 14:31 schrieb tomas.brandalik tomas.branda...@oracle.com:

 Hi Matthias,
 cool, I'm surprised you we're able to run it on emulator. I run on device not 
 on emulator for a long time. There wasn't  opengl extension 
 GL_EXT_texture_format_BGRA in emulator. But that could have changed 
 overtime.


well, this is probably not an coinsidence. I have seen your BGRA quirk, but 
this doesn't apply to Android actually.
I fixed it like someone fixed it for iOS:

public boolean isFormatSupported(PixelFormat format) {
GLFactory glFactory = ES2Pipeline.glFactory;
switch (format) {
case BYTE_RGB:
case BYTE_GRAY:
case BYTE_ALPHA:
case MULTI_YCbCr_420:
return true;
case BYTE_BGRA_PRE:
case INT_ARGB_PRE:
if (glFactory.isGL2() || PlatformUtil.isIOS() || 
PlatformUtil.isAndroid()) {


 Regarding events: yes there seems to be a problem which I haven't discovered. 
 I've pushed multitouch support and broke touch events on dalvik. I will fix 
 that soon.

It would be great, if you could pass the changes to me as well, since I have a 
backport (java6) from a backport(java7) running over here ;)
Otherwise, it could take a while.


 In order to replace t2k there is freetype library for fonts and glyphs access 
 and harfbuzz for layouting available among system libraries.  Although google 
 discourages to use them since they aren't part of public api. It can bring 
 all sorts of compatibility problems (harfbuzz implementation has changed in 
 recent android releases for example). Yes try pango if you have time to spare 
 and share results please.


Hhm, this sounds like quite some work. Pango would probably the fastest way to 
do. Do you know
where I have to place it?


regards
Matthias




Re: JAVAFX on ANDROID

2013-10-14 Thread Richard Bair
Hi Matthias,

 The main point of irritation comes from an quite unclear position about 
 providing the JVM and JFX of the Java-platform. 
 That's why I will sumarize what I heard between the lines:
 
 1. there is NO official jvm planned for iOS and Android in the near future.
 2. jfx8 is beeing officially maintained until some point for iOS and Android 
 but the actual port is left to the open source community.
 3. Linux ARM support is beeing focused officially on the Freescale 
 ARM-platform.

That is right.

 our conclusion is:
 1. that's not that bad anymore since we have RoboVM for iOS and Davlik on 
 Android.
 2. this statement should have been made 1 year ago. Probably, I missed it but 
 it was not clear to my team as well until last week.
   That's why we took the challenge to do it our selves.

You rock :-)

 3. This is good for the open source development since we probably can rely on 
 the CPU optimized parts for ARM.

This exactly. All the work we do for embedded translates directly to iOS and 
android, since it is the same hardware and graphics chips.

Cheers
Richard

hg: openjfx/8/graphics/rt: Fix for RT-33412: The mouse cursor needs to move in order for a setCursor(Cursor) to take effect

2013-10-14 Thread hang . vo
Changeset: 344b7903fd4c
Author:Lubomir Nerad lubomir.ne...@oracle.com
Date:  2013-10-14 15:55 +0200
URL:   http://hg.openjdk.java.net/openjfx/8/graphics/rt/rev/344b7903fd4c

Fix for RT-33412: The mouse cursor needs to move in order for a 
setCursor(Cursor) to take effect
Reviewed by: Pavel Safrata

! modules/graphics/src/main/java/javafx/scene/Node.java
! modules/graphics/src/main/java/javafx/scene/Scene.java
! modules/graphics/src/test/java/javafx/scene/SceneTest.java



hg: openjfx/8/graphics/rt: RT-31426 Modaility/toFront issues

2013-10-14 Thread hang . vo
Changeset: ab44fa8be486
Author:ddhill
Date:  2013-10-14 11:01 -0400
URL:   http://hg.openjdk.java.net/openjfx/8/graphics/rt/rev/ab44fa8be486

RT-31426 Modaility/toFront issues
reviewed: anthony, pchelko, kselle

! modules/graphics/src/main/java/com/sun/glass/ui/Window.java
! modules/graphics/src/main/java/com/sun/glass/ui/lens/LensWindow.java
! modules/graphics/src/main/native-glass/lens/LensApplication.c
! modules/graphics/src/main/native-glass/lens/LensWindow.c



Re: JAVAFX on ANDROID

2013-10-14 Thread Felipe Heidrich

Hi, I'm not familiar with the Android build process but basically this is what 
you need:

Build graphics/src/main/native-font/fontpath_linux.c to a library called 
javafx_font, that it will be loaded by PrismFontFactory.java (but used by 
FontConfigManager.java).
This is our fontconfig binding used to locate fonts. All references to 
fontconfig in the native code are dynamic, so you should only need the JNI 
references while building this object.


Build 
graphics/src/main/native-font/freetype.c
and
graphics/src/main/native-font/pango.c
To a library named javafx-font-pango

The cc flags to build them are pkg-config --cflags pangoft2 + 
-D_ENABLE_PANGO, the lib flags are pkg-config --libs pangoft2
(see rt/buildSrc/linux.gradle, search pangoCCFlags and pangoLinkFlags).

This library will be used by 
graphics/src/main/java/com/sun/javafx/font/pango/OS.java

During runtime you will need to explicitly set -Dprism.text=native so that 
PangoFactory.java is used (instead of T2KFactory.java).

Note: if that is too hard to build pango.o I suppose you could link 
javafx-font-pango.so only with freetype.o, you should not see any unsatisfied 
link exception as long as PangoFactory.createGlyphLayout is not called.

Setting -Dprism.debugfonts=true should help to see what is getting loaded, 
-Djavafx.verbose=true prints what library as being loaded by JFX.

Regards,
Felipe


On Oct 13, 2013, at 11:49 PM, Matthias Hänel hae...@ultramixer.com wrote:

 Is there a fallback? Pango doesn't work either it's not used in the android 
 gradle scripts. 
 I would be happy to integrate it and I am sure I can compile pango for 
 android. I just need a pointer to how I can integrate it into the build 
 process.
 I changed android.gradle but I am not sure where to put the pango sources.



hg: openjfx/8/graphics/rt: RT-33527: Style -fx-wrap-text worked only when set minWidth to control

2013-10-14 Thread hang . vo
Changeset: 7aa32bd90b97
Author:leifs
Date:  2013-10-14 17:22 -0700
URL:   http://hg.openjdk.java.net/openjfx/8/graphics/rt/rev/7aa32bd90b97

RT-33527: Style -fx-wrap-text worked only when set minWidth to control
Reviewed-by: jgiles

! 
modules/controls/src/main/java/com/sun/javafx/scene/control/skin/CheckBoxSkin.java
! 
modules/controls/src/main/java/com/sun/javafx/scene/control/skin/RadioButtonSkin.java



hg: openjfx/8/graphics/rt: [TOYS ONLY] Fix an old SubScene constructor call to use the new API.

2013-10-14 Thread hang . vo
Changeset: 829cb36bdc4e
Author:Chien Yang chien.y...@orcale.com
Date:  2013-10-14 17:42 -0700
URL:   http://hg.openjdk.java.net/openjfx/8/graphics/rt/rev/829cb36bdc4e

[TOYS ONLY] Fix an old SubScene constructor call to use the new API.

! apps/toys/FX8-3DFeatures/src/fx83dfeatures/SimpleMovingCameraSubScene.java



hg: openjfx/8/graphics/rt: 3 new changesets

2013-10-14 Thread hang . vo
Changeset: 554cf8a1c3aa
Author:jgiles
Date:  2013-10-15 10:42 +1300
URL:   http://hg.openjdk.java.net/openjfx/8/graphics/rt/rev/554cf8a1c3aa

RT-33229: [ListView] page up/down navigation doesn't work, when items are large
Reviewed-by: psomashe

! 
modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ListViewSkin.java
! 
modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TableViewSkinBase.java
! 
modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TreeViewSkin.java

Changeset: 2cbb5014e387
Author:jgiles
Date:  2013-10-15 11:42 +1300
URL:   http://hg.openjdk.java.net/openjfx/8/graphics/rt/rev/2cbb5014e387

RT-33558: [Virtualised Controls] Clicking a row twice should not send selection 
change events the second time
Reviewed-by: psomashe

! 
modules/controls/src/main/java/javafx/scene/control/MultipleSelectionModelBase.java
! modules/controls/src/main/java/javafx/scene/control/TableView.java
! modules/controls/src/main/java/javafx/scene/control/TreeTableView.java
! 
modules/controls/src/test/java/javafx/scene/control/ListViewMouseInputTest.java
! modules/controls/src/test/java/javafx/scene/control/TableViewKeyInputTest.java
! 
modules/controls/src/test/java/javafx/scene/control/TableViewMouseInputTest.java
! 
modules/controls/src/test/java/javafx/scene/control/TreeTableViewKeyInputTest.java
! 
modules/controls/src/test/java/javafx/scene/control/TreeTableViewMouseInputTest.java
! modules/controls/src/test/java/javafx/scene/control/TreeViewKeyInputTest.java
! 
modules/controls/src/test/java/javafx/scene/control/TreeViewMouseInputTest.java

Changeset: aa9149c6bf5d
Author:jgiles
Date:  2013-10-15 12:16 +1300
URL:   http://hg.openjdk.java.net/openjfx/8/graphics/rt/rev/aa9149c6bf5d

RT-33559: [TreeView, TreeTableView] Errant permutation events when selected row 
is expanded
Reviewed-by: psomashe

! 
modules/controls/src/main/java/javafx/scene/control/MultipleSelectionModelBase.java
! 
modules/controls/src/test/java/javafx/scene/control/ListViewMouseInputTest.java
! 
modules/controls/src/test/java/javafx/scene/control/TableViewMouseInputTest.java
! 
modules/controls/src/test/java/javafx/scene/control/TreeTableViewKeyInputTest.java
! 
modules/controls/src/test/java/javafx/scene/control/TreeTableViewMouseInputTest.java
! modules/controls/src/test/java/javafx/scene/control/TreeViewKeyInputTest.java
! 
modules/controls/src/test/java/javafx/scene/control/TreeViewMouseInputTest.java
! modules/controls/src/test/java/javafx/scene/control/TreeViewTest.java



hg: openjfx/8/graphics/rt: 2 new changesets

2013-10-14 Thread hang . vo
Changeset: 9f888001d100
Author:jgiles
Date:  2013-10-15 14:45 +1300
URL:   http://hg.openjdk.java.net/openjfx/8/graphics/rt/rev/9f888001d100

RT-32310: Issue on fixed cell height implementation

! 
modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TableRowSkinBase.java

Changeset: ace4d0178ecb
Author:jgiles
Date:  2013-10-15 15:13 +1300
URL:   http://hg.openjdk.java.net/openjfx/8/graphics/rt/rev/ace4d0178ecb

RT-20915: [ListView] CTRL-SHIFT-SPACE does not work in multi-selection mode
Fixed for ListView, TreeView, TableView and TreeTableView.

! 
modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/ListViewBehavior.java
! 
modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TableViewBehaviorBase.java
! 
modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TreeViewBehavior.java
! modules/controls/src/test/java/javafx/scene/control/ListViewKeyInputTest.java
! modules/controls/src/test/java/javafx/scene/control/TableViewKeyInputTest.java
! 
modules/controls/src/test/java/javafx/scene/control/TreeTableViewKeyInputTest.java
! modules/controls/src/test/java/javafx/scene/control/TreeViewKeyInputTest.java