Paul - The Programmer

simple & stupid

Enable Google Chrome 8 GPU accelerated rendering

The Chrome 8 comes with GPU acceleration. But this feature is disabled by default.

To enable this feature, just startup Chrome with parameter :

--enable-gpu-plugin --enable-gpu-rendering --enable-accelerated-2d-canvas --enable-accelerated-compositing

Then you should find the gpu plugin enabled in tab config:plugins.

I tried this on my old laptop ( Debian Lenny + Chrome testing brunch version 8 ). Didn't get to it works well. The web page be rendered in a mess.

Then try to start Chrome without the --enable-gpu-rendering, everything seems recovered. But didn't find anything noticeable accelerated comparing with the one without hardware accelerated.

The GPU rendering is still an incomplete functionality.

The testing web page is from Microsoft, http://ie.microsoft.com/testdrive/Performance/FishIETank/

My score is around 20 fishes with 15 FPS and the CPU is fully loaded.

What's a pity.

busy busy !

This year is a rather busy year.

The Impossible Dream

   To dream the impossible dream

    To fight the unbeatable foe

    To bear with unbearable sorrow

    To run where the brave dare not go.

    To right the unrightable wrong

    To be better far than you are

    To try when your arms are too weary

    To reach the unreachable star   

    This is my quest, to follow that star,   

    No matter how hopeless, no matter how far

    To be willing to give when there’’s no more to give

    To be willing to die so that honor and justice may live

    And I know if I”ll only be true to this glorious quest

    That my heart will lie peaceful and calm when I”m laid to my rest

    And the world will be better for this

    That one man scorned and covered with scars

    Still strove with his last ounce of courage

    To reach the unreachable star.

Hide Vim menu bar and tool bar

" Hide the menu bar

:set guioptions-=m

" Hide the tool bar

:set guioptions-=T

Configure javac to report messages in English

On my Chinese version Windows XP, the javac always shows Simple Chinese messages. But I'd rather see the English ones.

The traditional way is to change the default system Local setting, then the JVM local is changed as well. But this solution is too inconvenient and painful.

Fortunately, we do not have to do that. We can pass the '-J-Duser.language' option to the javac to change its JVM Local setting.

e.g.

javac '-J-Duser.language=en -J-Duser.country=GB' -help

 The javac will show the help messages in English instead of the Simple Chinese.

Those two options can also be passed in the ant script by adding the <compilerarg> in the <javac>

e.g.

<target name="compile" description="compile hello world">
       <mkdir dir="${classes}"/>
       <javac srcdir="${src}" destdir="${classes}"  fork="true" >
           <compilerarg value="-J-Duser.language=en"/>
           <compilerarg value="-J-Duser.country=GB"/>
       </javac>
</target>

The attribute fork="true" is mandatory. The two options can only effect the forked compiler.