| Index: sdk/lib/html/dartium/html_dartium.dart
|
| diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart
|
| index 65f548a92c98f2c8e63e193f1a7d973c9d08c6dd..1faa1262acd59083ebee5fc18b3ef8c19c8f0075 100644
|
| --- a/sdk/lib/html/dartium/html_dartium.dart
|
| +++ b/sdk/lib/html/dartium/html_dartium.dart
|
| @@ -1229,14 +1229,34 @@ class CanvasElement extends _Element_Merged {
|
|
|
| @DomName('HTMLCanvasElement.getContext')
|
| @DocsEditable
|
| - Object getContext(String contextId) native "HTMLCanvasElement_getContext_Callback";
|
| + CanvasRenderingContext getContext(String contextId, [Map attrs]) native "HTMLCanvasElement_getContext_Callback";
|
|
|
| @DomName('HTMLCanvasElement.toDataURL')
|
| @DocsEditable
|
| String toDataUrl(String type, [num quality]) native "HTMLCanvasElement_toDataURL_Callback";
|
|
|
| -
|
| CanvasRenderingContext2D get context2d => getContext('2d');
|
| +
|
| + @SupportedBrowser(SupportedBrowser.CHROME)
|
| + @SupportedBrowser(SupportedBrowser.FIREFOX)
|
| + @Experimental
|
| + WebGLRenderingContext getContext3d({alpha: true, depth: true, stencil: false,
|
| + antialias: true, premultipliedAlpha: true, preserveDrawingBuffer: false}) {
|
| +
|
| + var options = {
|
| + 'alpha': alpha,
|
| + 'depth': depth,
|
| + 'stencil': stencil,
|
| + 'antialias': antialias,
|
| + 'premultipliedAlpha': premultipliedAlpha,
|
| + 'preserveDrawingBuffer': preserveDrawingBuffer,
|
| + };
|
| + var context = getContext('webgl', options);
|
| + if (context == null) {
|
| + context = getContext('experimental-webgl', options);
|
| + }
|
| + return context;
|
| + }
|
| }
|
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| @@ -26348,9 +26368,15 @@ class WebGLRenderbuffer extends NativeFieldWrapperClass1 {
|
|
|
| @DocsEditable
|
| @DomName('WebGLRenderingContext')
|
| +@SupportedBrowser(SupportedBrowser.CHROME)
|
| +@SupportedBrowser(SupportedBrowser.FIREFOX)
|
| +@Experimental
|
| class WebGLRenderingContext extends CanvasRenderingContext {
|
| WebGLRenderingContext.internal() : super.internal();
|
|
|
| + /// Checks if this type is supported on the current platform.
|
| + static bool get supported => true;
|
| +
|
| static const int ACTIVE_ATTRIBUTES = 0x8B89;
|
|
|
| static const int ACTIVE_TEXTURE = 0x84E0;
|
|
|