Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(140)

Side by Side Diff: sdk/lib/web_gl/dart2js/web_gl_dart2js.dart

Issue 35863006: Fix for getContextAttributes which wraps bare dictionary into a Dart type. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /** 1 /**
2 * 3D programming in the browser. 2 * 3D programming in the browser.
3 */ 3 */
4 library dart.dom.web_gl; 4 library dart.dom.web_gl;
5 5
6 import 'dart:collection'; 6 import 'dart:collection';
7 import 'dart:_collection-dev' hide deprecated; 7 import 'dart:_collection-dev' hide deprecated;
8 import 'dart:html'; 8 import 'dart:html';
9 import 'dart:html_common'; 9 import 'dart:html_common';
10 import 'dart:typed_data'; 10 import 'dart:typed_data';
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 @DomName('WebGLCompressedTextureS3TC.COMPRESSED_RGB_S3TC_DXT1_EXT') 473 @DomName('WebGLCompressedTextureS3TC.COMPRESSED_RGB_S3TC_DXT1_EXT')
474 @DocsEditable() 474 @DocsEditable()
475 static const int COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83F0; 475 static const int COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83F0;
476 } 476 }
477 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 477 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
478 // for details. All rights reserved. Use of this source code is governed by a 478 // for details. All rights reserved. Use of this source code is governed by a
479 // BSD-style license that can be found in the LICENSE file. 479 // BSD-style license that can be found in the LICENSE file.
480 480
481 481
482 @DocsEditable() 482 @DocsEditable()
483 /**
484 * The properties of a WebGL rendering context.
485 *
486 * If [alpha] is `true`, then the context has an alpha channel.
487 *
488 * If [antialias] is `true`, then antialiasing is performed by the browser, but
489 * only if the browser's implementation of WebGL supports antialiasing.
490 *
491 * If [depth] is `true`, then the context has a depth buffer of at least 16
492 * bits.
493 *
494 * If [premultipliedAlpha] is `true`, then the context's colors are assumed to
495 * be premultiplied. This means that color values are assumed to have been
496 * multiplied by their alpha values. If [alpha] is `false`, then this flag is
497 * ignored.
498 *
499 * If [preserveDrawingBuffer] is `false`, then all contents of the context are
500 * cleared. If `true`, then all values will remain until changed or cleared.
501 *
502 * If [stencil] is `true`, then the context has a stencil buffer of at least 8
503 * bits.
504 */
483 @DomName('WebGLContextAttributes') 505 @DomName('WebGLContextAttributes')
484 @Unstable() 506 @Unstable()
485 class ContextAttributes extends Interceptor native "WebGLContextAttributes" { 507 class ContextAttributes extends Interceptor native "WebGLContextAttributes" {
486 // To suppress missing implicit constructor warnings. 508 // To suppress missing implicit constructor warnings.
487 factory ContextAttributes._() { throw new UnsupportedError("Not supported"); } 509 factory ContextAttributes._() { throw new UnsupportedError("Not supported"); }
488 510
489 @DomName('WebGLContextAttributes.alpha') 511 @DomName('WebGLContextAttributes.alpha')
490 @DocsEditable() 512 @DocsEditable()
491 bool alpha; 513 bool alpha;
492 514
(...skipping 1956 matching lines...) Expand 10 before | Expand all | Expand 10 after
2449 int getAttribLocation(Program program, String name) native; 2471 int getAttribLocation(Program program, String name) native;
2450 2472
2451 @DomName('WebGLRenderingContext.getBufferParameter') 2473 @DomName('WebGLRenderingContext.getBufferParameter')
2452 @DocsEditable() 2474 @DocsEditable()
2453 @Creates('int|Null') 2475 @Creates('int|Null')
2454 @Returns('int|Null') 2476 @Returns('int|Null')
2455 Object getBufferParameter(int target, int pname) native; 2477 Object getBufferParameter(int target, int pname) native;
2456 2478
2457 @DomName('WebGLRenderingContext.getContextAttributes') 2479 @DomName('WebGLRenderingContext.getContextAttributes')
2458 @DocsEditable() 2480 @DocsEditable()
2459 ContextAttributes getContextAttributes() native; 2481 @Creates('ContextAttributes|=Object')
2482 ContextAttributes getContextAttributes() {
2483 return convertNativeToDart_ContextAttributes(_getContextAttributes_1());
2484 }
2485 @JSName('getContextAttributes')
2486 @DomName('WebGLRenderingContext.getContextAttributes')
2487 @DocsEditable()
2488 @Creates('ContextAttributes|=Object')
2489 _getContextAttributes_1() native;
2460 2490
2461 @DomName('WebGLRenderingContext.getError') 2491 @DomName('WebGLRenderingContext.getError')
2462 @DocsEditable() 2492 @DocsEditable()
2463 int getError() native; 2493 int getError() native;
2464 2494
2465 @DomName('WebGLRenderingContext.getExtension') 2495 @DomName('WebGLRenderingContext.getExtension')
2466 @DocsEditable() 2496 @DocsEditable()
2467 Object getExtension(String name) native; 2497 Object getExtension(String name) native;
2468 2498
2469 @DomName('WebGLRenderingContext.getFramebufferAttachmentParameter') 2499 @DomName('WebGLRenderingContext.getFramebufferAttachmentParameter')
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after
3199 3229
3200 3230
3201 @DocsEditable() 3231 @DocsEditable()
3202 @DomName('WebGLVertexArrayObjectOES') 3232 @DomName('WebGLVertexArrayObjectOES')
3203 // http://www.khronos.org/registry/webgl/extensions/OES_vertex_array_object/ 3233 // http://www.khronos.org/registry/webgl/extensions/OES_vertex_array_object/
3204 @Experimental() // experimental 3234 @Experimental() // experimental
3205 class VertexArrayObject extends Interceptor native "WebGLVertexArrayObjectOES" { 3235 class VertexArrayObject extends Interceptor native "WebGLVertexArrayObjectOES" {
3206 // To suppress missing implicit constructor warnings. 3236 // To suppress missing implicit constructor warnings.
3207 factory VertexArrayObject._() { throw new UnsupportedError("Not supported"); } 3237 factory VertexArrayObject._() { throw new UnsupportedError("Not supported"); }
3208 } 3238 }
OLDNEW
« no previous file with comments | « sdk/lib/html/html_common/html_common_dart2js.dart ('k') | sdk/lib/web_gl/dartium/web_gl_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698