diff options
author | neb@chromium.org <neb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-13 23:47:53 +0000 |
---|---|---|
committer | neb@chromium.org <neb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-13 23:47:53 +0000 |
commit | 4775604ab44e737268f30d8fc3a29eb308475d00 (patch) | |
tree | 77d99500ed286ec99d2e62cf576b1ccfb5a202da /gpu/demos/run_demo_ppapi.sh | |
parent | 3ed462685a542d3a9625d8fa24a5755a283530ae (diff) | |
download | chromium_src-4775604ab44e737268f30d8fc3a29eb308475d00.zip chromium_src-4775604ab44e737268f30d8fc3a29eb308475d00.tar.gz chromium_src-4775604ab44e737268f30d8fc3a29eb308475d00.tar.bz2 |
Made GLES demos work on PPAPI.
BUG=none
TEST=they work on Windows and Linux.
Review URL: http://codereview.chromium.org/3132017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59304 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/demos/run_demo_ppapi.sh')
-rwxr-xr-x | gpu/demos/run_demo_ppapi.sh | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/gpu/demos/run_demo_ppapi.sh b/gpu/demos/run_demo_ppapi.sh new file mode 100755 index 0000000..fba5ad1 --- /dev/null +++ b/gpu/demos/run_demo_ppapi.sh @@ -0,0 +1,29 @@ +#!/bin/sh +# Copyright (c) 2010 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +if [ -z "$1" ]; then + echo "Usage: $(basename "$0") <demo_name> [--debug]" >&2 + echo >&2 + echo "Builds and runs PPAPI demo inside Chrome." >&2 + echo "Debug flag attaches the debugger to renderer process." >&2 + echo >&2 + echo "Try: $0 hello_triangle" >&2 + echo >&2 + exit 1 +fi +if [ "$2" == "--debug" ]; then + CHROME_DEBUG="--renderer-cmd-prefix=xterm -geometry 150x40 -e gdb --args" +else + CHROME_DEBUG= +fi +CHROME_SRC="$(dirname "$(dirname "$(dirname "$(readlink -f "$0")")")")" +PLUGIN_LIB="$CHROME_SRC/out/Debug/lib${1}_ppapi.so" +PLUGIN_MIME="pepper-application/x-gpu-demo" +cd "$CHROME_SRC" +make "${1}_ppapi" && out/Debug/chrome --use-gl=osmesa --enable-gpu-plugin \ + "${CHROME_DEBUG}" \ + --register-pepper-plugins="$PLUGIN_LIB;$PLUGIN_MIME" \ + "file://$CHROME_SRC/gpu/demos/pepper_gpu_demo.html" + |