Intent to Ship: WebGL on Android

904 views
Skip to first unread message

Sami Kyostila

unread,
Jul 31, 2013, 4:04:57 PM7/31/13
to blink-dev, graphics-dev, Kenneth Russell, baj...@chromium.org, z...@chromium.org
Primary eng (and PM) emails
skyo...@chromium.org

Spec
https://www.khronos.org/registry/webgl/specs/1.0/

Summary
We'd like to enable WebGL support by default on compatible Android devices. More specifically, we'll only do this on devices with GPUs that implement the GL_ARB_robustness OpenGL extension. This extension ensures the GPU provides the needed robustness and security safeguards against malicious WebGL content.

The implementation has been verified against the WebGL 1.0.1 conformance test suite provided by Khronos. WebGL has also been behind a developer early access setting on Android since Chrome M25.

Link to “Intent to Implement” blink-dev discussion
WebGL implementation predates blink-dev.

Is this feature supported on all five Blink platforms (Windows, Mac, Linux, Chrome OS and Android)?
Yes.

OWP launch tracking bug?
http://crbug.com/165997 (Implementation tracking bug: http://crbug.com/112928)

Row on feature dashboard?
Yes.

Brandon Jones

unread,
Jul 31, 2013, 4:23:47 PM7/31/13
to Sami Kyostila, blink-dev, graphics-dev, Kenneth Russell, Zhenyao Mo
I lack the authority to officially give this a LG stamp, but I'd like to say that I support this 100%! I know a lot of developers that have been eagerly awaiting this change.

Dimitri Glazkov

unread,
Jul 31, 2013, 4:43:24 PM7/31/13
to Sami Kyostila, blink-dev, graphics-dev, Kenneth Russell, baj...@chromium.org, Zhenyao Mo
LGTM.

On Wed, Jul 31, 2013 at 1:04 PM, Sami Kyostila <skyo...@google.com> wrote:

Ojan Vafai

unread,
Jul 31, 2013, 4:44:48 PM7/31/13
to Dimitri Glazkov, Sami Kyostila, blink-dev, graphics-dev, Kenneth Russell, baj...@chromium.org, Zhenyao Mo
LGTM as well.

Will feature detection work as normal for android builds that do or don't support WebGL?

Adam Barth

unread,
Jul 31, 2013, 5:16:41 PM7/31/13
to Ojan Vafai, Dimitri Glazkov, Sami Kyostila, blink-dev, graphics-dev, Kenneth Russell, baj...@chromium.org, Zhenyao Mo
LGTM

Kenneth Russell

unread,
Jul 31, 2013, 6:10:54 PM7/31/13
to Adam Barth, Ojan Vafai, Dimitri Glazkov, Sami Kyostila, blink-dev, graphics-dev, baj...@chromium.org, Zhenyao Mo
+1

Kenneth Rohde Christiansen

unread,
Jul 31, 2013, 6:04:34 PM7/31/13
to Adam Barth, Ojan Vafai, Dimitri Glazkov, Sami Kyostila, blink-dev, graphics-dev, Kenneth Russell, baj...@chromium.org, Zhenyao Mo
LGTM!
--
Kenneth Rohde Christiansen
Senior Engineer, WebKit, Qt, EFL
Phone +45 4294 9458 / E-mail kenneth at webkit.org

﹆﹆﹆

Darin Fisher

unread,
Jul 31, 2013, 9:42:49 PM7/31/13
to Kenneth Russell, z...@chromium.org, blink-dev, graphics-dev, Ojan Vafai, Dimitri Glazkov, Adam Barth, baj...@chromium.org, Sami Kyostila

LGTM2

Sami Kyostila

unread,
Aug 1, 2013, 6:30:50 AM8/1/13
to Ojan Vafai, Dimitri Glazkov, blink-dev, graphics-dev, Kenneth Russell, baj...@chromium.org, Zhenyao Mo
Thanks all!

On 31 July 2013 21:44, Ojan Vafai <oj...@chromium.org> wrote:
Will feature detection work as normal for android builds that do or don't support WebGL?

Yes, feature detection is done by trying to create a WebGL context, and that will only succeed on supported devices.

- Sami

PhistucK

unread,
Aug 1, 2013, 5:49:19 PM8/1/13
to Sami Kyostila, Ojan Vafai, Dimitri Glazkov, blink-dev, graphics-dev, Kenneth Russell, baj...@chromium.org, Zhenyao Mo
Will the (deprecated?) "experimental-webgl" context name be supported too, or will only "webgl" be available?
I support the latter, of course.


PhistucK

Brandon Jones

unread,
Aug 1, 2013, 5:58:44 PM8/1/13
to PhistucK, Sami Kyostila, Ojan Vafai, Dimitri Glazkov, blink-dev, graphics-dev, Kenneth Russell, Zhenyao Mo
There is an awful lot of WebGL context that still uses "experimental-webgl", so excluding it would be a very bad idea.

PhistucK

unread,
Aug 1, 2013, 6:03:29 PM8/1/13
to Brandon Jones, Sami Kyostila, Ojan Vafai, Dimitri Glazkov, blink-dev, graphics-dev, Kenneth Russell, Zhenyao Mo
On one hand, yes. On the other, most of these demos were not meant really for mobile/small screens anyway and should probably be re-coded or checked for compatibility with the new constraints.


PhistucK

Alex Russell

unread,
Aug 1, 2013, 6:27:07 PM8/1/13
to PhistucK, Brandon Jones, Sami Kyostila, Ojan Vafai, Dimitri Glazkov, blink-dev, graphics-dev, Kenneth Russell, Zhenyao Mo
I'm inclined to agree, but I'd like to understand this with data. Do we have histograms on this?

Alexandre Elias

unread,
Aug 1, 2013, 6:31:54 PM8/1/13
to PhistucK, Brandon Jones, Sami Kyostila, Ojan Vafai, Dimitri Glazkov, blink-dev, graphics-dev, Kenneth Russell, Zhenyao Mo
Chrome for Android supports almost all features of sites designed for desktop even if the experience isn't necessarily ideal, and I don't see why we should have a different policy for WebGL.  The "new constraints" are the same as for any other kind of web platform feature (namely a smaller display and poorer performance).  To provide predictable behavior to web developers, we also strive to support the same set of feature flags.

So I think that when we're ready to remove "experimental-webgl", we should do it at the same time for desktop Chrome and Chrome for Android.

Darin Fisher

unread,
Aug 1, 2013, 6:45:22 PM8/1/13
to Alexandre Elias, PhistucK, Brandon Jones, Sami Kyostila, Ojan Vafai, Dimitri Glazkov, blink-dev, graphics-dev, Kenneth Russell, Zhenyao Mo
+1

Please note that this applies to tablets too, which are similar to some laptop hardware ;-)

-Darin

Paul Lewis

unread,
Aug 2, 2013, 5:58:57 AM8/2/13
to Darin Fisher, Alexandre Elias, PhistucK, Brandon Jones, Sami Kyostila, Ojan Vafai, Dimitri Glazkov, blink-dev, graphics-dev, Kenneth Russell, Zhenyao Mo
With respect to 'webg' vs 'experimental-webgl': I have a pull request open for Three.js which has it to request a 'webgl' context should getting 'experimental-webgl' fail. That should at least cover a good bunch of people who may be affected as and when we look to switch.

I am also happy to promote the change as and when we get there, and we should give the WebGL info outlets the heads up, too.

Sami Kyostila

unread,
Aug 2, 2013, 8:02:06 AM8/2/13
to Alexandre Elias, PhistucK, Brandon Jones, Ojan Vafai, Dimitri Glazkov, blink-dev, graphics-dev, Kenneth Russell, Zhenyao Mo
Agreed, it doesn't seem like we need to special case mobile platforms w.r.t. context creation. I'll make sure both "webgl" and "experimental-webgl" are supported like on desktop and add a histogram to track what people are using.

- Sami

Christian Biesinger

unread,
Aug 2, 2013, 12:23:04 PM8/2/13
to Paul Lewis, Darin Fisher, Alexandre Elias, PhistucK, Brandon Jones, Sami Kyostila, Ojan Vafai, Dimitri Glazkov, blink-dev, graphics-dev, Kenneth Russell, Zhenyao Mo
Wouldn't it make more sense to first try "webgl" and only use
experimental-webgl if that fails...?

(that would also help us get better metrics for how many pages use
experimental-webgl vs webgl)

-christian

PhistucK

unread,
Aug 2, 2013, 12:36:49 PM8/2/13
to Christian Biesinger, Paul Lewis, Darin Fisher, Alexandre Elias, Brandon Jones, Sami Kyostila, Ojan Vafai, Dimitri Glazkov, blink-dev, graphics-dev, Kenneth Russell, Zhenyao Mo
Yes. I am really surprised they only went for experimental-webgl.

A similar mistake was made by rng.io. For some reason, they test for the nonstandard context names first and if they get a context, they bail and assert whether the name is "webgl".
I have a pull request that fixes that. Hopefully, they will accept it and ring 2 would be a little more filled for Chrome. ;)


PhistucK

Sami Kyostila

unread,
Oct 31, 2013, 7:10:25 AM10/31/13
to PhistucK, Christian Biesinger, Paul Lewis, Darin Fisher, Alexandre Elias, Brandon Jones, Ojan Vafai, Dimitri Glazkov, blink-dev, graphics-dev, Kenneth Russell, Zhenyao Mo, Max Heinritz
Since I've been some getting questions about how common the context
robustness extension is, I thought I'd give an update here. I took a
look a the data on gfxbench.com and 959 out of the 1821 Android
devices on there report the extension. A caveat with this number is
that it includes devices that don't support reset notification which
we also check for (see crbug.com/288731).

The word from the mobile GPU vendors is that the upcoming GPU
generation should have robustness support pretty much across the
board. We're also looking at making WebGL a more prominent part of
Android conformance testing.

- Sami
Reply all
Reply to author
Forward
0 new messages