2008/10/15

***Standalone skia***


***Standalone skia***

Skia( as known as Graphics Engine) is the graphics engined used in Chrome[1] , a technology that Google has aquired[2].

It comes as a part of Chrominum but I want to taste it as a stand-alone.
So I tried.

You need scons[8] to build skia. scons 1.1.0 is known to work.
You also need to install cairo[9]. cairo version 1.8.0 is known to work.

Just download skia standalone for linux[10], then

tar xvzf skia-standalone-2008-10-15.tar.gz
cd skia
scons -c # clean the build ( equivelent to make clean )
scons # to build ( equivelent to make )
cd examples # vi SConstruct to ensure that you have correct cairo build settings
scons # build the example.
./helloworld #run the example.
vi helloworld.cpp #for more information [12]

If now have examples/snapshot.png[11] which is an .png ping.

[1] http://gigaom.com/2008/09/02/google-open-sources-skia-graphics-engine/
[2] http://gigaom.com/2007/09/03/google-phone-facts/
[3] Skia original code http://src.chromium.org/viewvc/chrome/trunk/src/skia/
[4] Chrome is out http://www.satine.org/archives/2008/09/02/skia-source-code-released/
[5] Chrome website http://www.google.com/chrome
[6] http://www.satine.org/archives/2007/03/05/the-skia-source-code-dilemma/
[7] http://www.atoker.com/blog/2008/09/06/skia-graphics-library-in-chrome-first-impressions
[8] http://www.scons.org
[9] http://cairographics.org
[10] http://aoclife.ddo.jp/~vuhung/foss/skia/skia-standalone-2008-10-15.tar.gz
[11] http://aoclife.ddo.jp/~vuhung/foss/skia/snapshot.png
[12] http://aoclife.ddo.jp/~vuhung/foss/skia/helloworld.cpp

1 件のコメント:

匿名 さんのコメント...

Nice work! I was able to compile download the standalone source and compile for OS X 10.4. The only dirty work is with Scons. The standard SConstruct assumes a typical linux environment, with you libraries and includes in the standard locations. On the mac, it can be a bit different. For starters, the "legacy" X11 and GTK stuff will need to be in place. The easiest way to do this is not to build from source as we normally do under Linux. I put use Fink to the various tools, and the GTK+ project sponsors an OS X version which seems to be pretty stable and an easy install. Cairo is available under fink (similar to deb packaging repository). Example runs fine. Very happy to have found your blog, and thanks for the pointer that skia could be extracted into a standalone use.