基于淺談 Google Skia 圖形處理引擎和Skia Demo Build。 Skia是一个跨平台的图形库,目前使用在Android中,同样也有PC版本,这里测试一下以了解其内涵。
1.PC版本测试:
首先:sudo apt-get install libfreetype6-dev libpng-dev
# 1.下载 Skia git clone git@github.com:google/skia.git# 2.切换到老版本 参考ubuntu 移植SKIA的日期进行回退git reset --hard 0e2810be95d3f1aa95c341521d3f514eb9e9ebde# 注:不使用git的话,也可以点击skia_0e2810b下载# 3.查看编译帮助$ make helpTargets: <default>: out/libskia.a bench: out/bench/bench gm: out/gm/gm skimage: out/tools/skimage skhello: out/tools/skhello tests: out/tests/tests clean: removes entire out/ directory help: this textOptions: (after make, or in bash shell) SKIA_DEBUG=true for debug build SKIA_SCALAR=fixed for fixed-point build SKIA_BUILD_FOR=mac for mac build (e.g. CG for image decoding)SKIA_PDF_SUPPORT=false to disable the pdf generation backend# 3.进行编译$ make SKIA_BUILD_FOR=linux# 4.将Skia Demo Build的例子保存为test-skia.c。# 5.编译测试程序$ g++ \ -I./include \ -I./include/core \ -I./include/images \ -I./include/config \ -Wall -o test-s