summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/skia/platform_tools/android/bin/android_kill_skia
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/skia/platform_tools/android/bin/android_kill_skia')
-rwxr-xr-xchromium/third_party/skia/platform_tools/android/bin/android_kill_skia33
1 files changed, 33 insertions, 0 deletions
diff --git a/chromium/third_party/skia/platform_tools/android/bin/android_kill_skia b/chromium/third_party/skia/platform_tools/android/bin/android_kill_skia
new file mode 100755
index 00000000000..a17f88d9736
--- /dev/null
+++ b/chromium/third_party/skia/platform_tools/android/bin/android_kill_skia
@@ -0,0 +1,33 @@
+#!/bin/bash
+#
+# android_kill_skia: kills any skia processes on the device.
+
+SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+
+source $SCRIPT_DIR/utils/setup_adb.sh
+
+SERIAL=""
+
+while (( "$#" )); do
+
+ if [[ "$1" == "-s" ]];
+ then
+ if [[ $# -lt 2 ]];
+ then
+ echo "ERROR: missing serial number"
+ exit 1;
+ fi
+ SERIAL="-s $2"
+ shift
+ fi
+ shift
+done
+
+if [ $(uname) == "Linux" ]; then
+ $ADB $SERIAL shell ps | grep skia | awk '{print $2}' | xargs -r $ADB $SERIAL shell kill
+elif [ $(uname) == "Darwin" ]; then
+ $ADB $SERIAL shell ps | grep skia | awk '{print $2}' | xargs $ADB $SERIAL shell kill
+else
+ echo "Could not automatically determine OS!"
+ exit 1;
+fi \ No newline at end of file