diff options
author | djsollen@google.com <djsollen@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-06-13 16:58:40 +0000 |
---|---|---|
committer | djsollen@google.com <djsollen@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-06-13 16:58:40 +0000 |
commit | e32b5837c3f35b80502759f3de3e8cadf6625f4e (patch) | |
tree | 9073864ddc2d7ec2d5b83fb1c318218f41dc7d89 /include | |
parent | fc0685652ea1617b93aed84c7674fcafd55a30f6 (diff) |
Updates to the Android SampleApp
http://codereview.appspot.com/4602049/
git-svn-id: http://skia.googlecode.com/svn/trunk@1567 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include')
-rw-r--r-- | include/utils/android/AndroidKeyToSkKey.h | 4 | ||||
-rw-r--r-- | include/views/SkOSWindow_Android.h | 9 |
2 files changed, 10 insertions, 3 deletions
diff --git a/include/utils/android/AndroidKeyToSkKey.h b/include/utils/android/AndroidKeyToSkKey.h index 7b0a03570e..ad93661871 100644 --- a/include/utils/android/AndroidKeyToSkKey.h +++ b/include/utils/android/AndroidKeyToSkKey.h @@ -17,7 +17,7 @@ #ifndef _ANDROID_TO_SKIA_KEYCODES_H #define _ANDROID_TO_SKIA_KEYCODES_H -#include "keycodes.h" +#include "android/keycodes.h" #include "SkKey.h" // Convert an Android keycode to an SkKey. This is an incomplete list, only @@ -32,6 +32,8 @@ SkKey AndroidKeycodeToSkKey(int keycode) { return kUp_SkKey; case AKEYCODE_DPAD_DOWN: return kDown_SkKey; + case AKEYCODE_BACK: + return kBack_SkKey; default: return kNONE_SkKey; } diff --git a/include/views/SkOSWindow_Android.h b/include/views/SkOSWindow_Android.h index 38a4cf8f5e..569f3f7f91 100644 --- a/include/views/SkOSWindow_Android.h +++ b/include/views/SkOSWindow_Android.h @@ -20,14 +20,19 @@ #include "SkWindow.h" #include "SkEvent.h" +class GrContext; + class SkOSWindow : public SkWindow { public: SkOSWindow(void*) {} ~SkOSWindow() {} - bool attachGL() { return false; } + bool attachGL() { return true; } void detachGL() {} void presentGL() {} - + virtual bool drawsToHardware() { return false; } + virtual bool setGrContext(GrContext*) { return false; } + virtual GrContext* getGrContext() { return NULL; } + virtual void changeZoomLevel(float delta) {} protected: // overrides from SkWindow virtual void onHandleInval(const SkIRect&); |