VisualBench: Use first succeeding EGL API
authorkkinnunen <kkinnunen@nvidia.com>
Thu, 14 Jan 2016 17:12:01 +0000 (09:12 -0800)
committerCommit bot <commit-bot@chromium.org>
Thu, 14 Jan 2016 17:12:01 +0000 (09:12 -0800)
commitfe09119dd2acb43bb9986e6edeef3a480b539473
treedbe30a8c51d8e3644c32b91d8b58790aff07eb12
parenta40be09c443d15fcb080adde0ab9625e8a5af73d
VisualBench: Use first succeeding EGL API

Fix initialization of the app window by
using the first EGL context that succeeds, not the last one.

Fixes the window creation in some cases on devices that support
OpenGL and OpenGL ES.

Also check EGL call results.

BUG=skia:4733
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1582313002

Review URL: https://codereview.chromium.org/1582313002
platform_tools/android/apps/visualbench/src/main/jni/SkOSWindow_AndroidNative.cpp