Add support for building Android SampleApp.

Review URL: http://codereview.appspot.com/5342051

git-svn-id: http://skia.googlecode.com/svn/trunk@2617 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
djsollen@google.com 2011-11-07 15:43:57 +00:00
Родитель 85b505bedc
Коммит 6ff82553df
3 изменённых файлов: 23 добавлений и 4 удалений

Просмотреть файл

@ -86,6 +86,21 @@
'../unix_test_app/main.cpp',
],
}],
[ 'skia_os == "android"', {
# Android does not support animator so we need to remove all files
# that have references to it.
'include_dirs!': [
'../include/animator',
],
'sources!': [
'../src/views/SkBorderView.cpp',
'../src/views/SkImageView.cpp',
'../src/views/SkProgressBarView.cpp',
'../src/views/SkScrollBarView.cpp',
'../src/views/SkStaticTextView.cpp',
'../src/views/SkWidgetViews.cpp',
],
}],
],
'direct_dependent_settings': {
'include_dirs': [

Просмотреть файл

@ -24,7 +24,7 @@
},
'defines': [ 'SK_ZLIB_INCLUDE=<zlib.h>', ],
}],
[ 'skia_os in ["linux", "freebsd", "openbsd", "solaris"]', {
[ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "android"]', {
'link_settings': { 'libraries': [ '-lz', ], },
'defines': [ 'SK_ZLIB_INCLUDE=<zlib.h>', ],
}],

Просмотреть файл

@ -1423,9 +1423,7 @@ bool SampleWindow::onHandleChar(SkUnichar uni) {
return true;
case 'f':
// only
fMeasureFPS = !fMeasureFPS;
this->updateTitle();
this->inval(NULL);
toggleFPS();
break;
case 'g':
fRequestGrabImage = true;
@ -1494,6 +1492,12 @@ void SampleWindow::toggleRendering() {
this->inval(NULL);
}
void SampleWindow::toggleFPS() {
fMeasureFPS = !fMeasureFPS;
this->updateTitle();
this->inval(NULL);
}
#include "SkDumpCanvas.h"
bool SampleWindow::onHandleKey(SkKey key) {