skia2/platform_tools/android/examples/hello_skia_app
robertphillips 0652baa23e Revert of Cleanup use of legacy SkSurface creation methods a bit (patchset #2 id:20001 of https://codereview.chromium.org/2223023002/ )
Reason for revert:
webkit_headless!

Original issue's description:
> Cleanup use of legacy SkSurface creation methods a bit
>
> This:
>    removes the SK_SUPPORT_LEGACY_NEW_SURFACE_API flag from the bzl build
>    cleans up some remaining uses of the old API
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2223023002
>
> Committed: https://skia.googlesource.com/skia/+/f21cd16228c20927fa4e9b937d6951471cfaa37a

TBR=benjaminwagner@google.com,egdaniel@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.chromium.org/2220933004
2016-08-08 09:17:20 -07:00
..
jni Revert of Cleanup use of legacy SkSurface creation methods a bit (patchset #2 id:20001 of https://codereview.chromium.org/2223023002/ ) 2016-08-08 09:17:20 -07:00
res add launcher icon for android hello_skia_app 2013-06-05 15:44:16 +00:00
src/com/example create simple skia app for android using jni 2013-06-04 21:13:11 +00:00
AndroidManifest.xml create simple skia app for android using jni 2013-06-04 21:13:11 +00:00
build.xml create simple skia app for android using jni 2013-06-04 21:13:11 +00:00
project.properties create simple skia app for android using jni 2013-06-04 21:13:11 +00:00
README create simple skia app for android using jni 2013-06-04 21:13:11 +00:00

HelloSkia
=========

Intro
-----

This is a minimal Android app that uses JNI and Skia to do rendering.

Setup
-----

These instructions need to be followed only once to setup your copy of HelloSkia. Path parts that
are surrounded with curly braces should be replaced with the paths that are described.

1. Follow the quick start guide on building Skia for Android.

2. Copy {Skia root directory}/trunk/out/config/android-{your architecture}/{Relase or
Debug}/lib.target/libskia_android.so into {HellSkia root directory}/jni/skia/libskia_android.so

3. Copy {Skia root directory}/trunk/include into {HellSkia root directory}/jni/skia. This should be
done so that the path {HellSkia root directory}/jni/skia/include is a folder that contains, to name
just a few, the folders config and core.


Building
--------

The following assumes that the platform-tools directory of the Android SDK and the Android NDK
directory are both on the system path. This also assumes that adb is working and connected with some
device or virtual device.

1. Open a terminal to the HelloSkia root directory and enter these commands:

$ ndk-build # Builds the modules inside of jni/
$ ant debug # Builds the Activity and packages it with all resources and modules of jni/
$ adb install -r bin/HelloSkia-debug.apk # Installs the app onto a device

2. To run the app, open your Android device's launcher and start the application labeled
HelloSkiaActivity.