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

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

Issue 15138002: Added tests to previously broken functionality and added null checks. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 months 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 library dart.dom.web_gl; 1 library dart.dom.web_gl;
2 2
3 import 'dart:collection'; 3 import 'dart:collection';
4 import 'dart:_collection-dev'; 4 import 'dart:_collection-dev';
5 import 'dart:html'; 5 import 'dart:html';
6 import 'dart:html_common'; 6 import 'dart:html_common';
7 import 'dart:typed_data'; 7 import 'dart:typed_data';
8 import 'dart:_js_helper' show Creates, JSName, Null, Returns, convertDartClosure ToJS; 8 import 'dart:_js_helper' show Creates, JSName, Null, Returns, convertDartClosure ToJS;
9 import 'dart:_foreign_helper' show JS; 9 import 'dart:_foreign_helper' show JS;
10 import 'dart:_interceptors' show Interceptor; 10 import 'dart:_interceptors' show Interceptor;
(...skipping 2384 matching lines...) Expand 10 before | Expand all | Expand 10 after
2395 @DocsEditable 2395 @DocsEditable
2396 void stencilOp(int fail, int zfail, int zpass) native; 2396 void stencilOp(int fail, int zfail, int zpass) native;
2397 2397
2398 @DomName('WebGLRenderingContext.stencilOpSeparate') 2398 @DomName('WebGLRenderingContext.stencilOpSeparate')
2399 @DocsEditable 2399 @DocsEditable
2400 void stencilOpSeparate(int face, int fail, int zfail, int zpass) native; 2400 void stencilOpSeparate(int face, int fail, int zfail, int zpass) native;
2401 2401
2402 @DomName('WebGLRenderingContext.texImage2D') 2402 @DomName('WebGLRenderingContext.texImage2D')
2403 @DocsEditable 2403 @DocsEditable
2404 void texImage2D(int target, int level, int internalformat, int format_OR_width , int height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video, [int format, int type, TypedData pixels]) { 2404 void texImage2D(int target, int level, int internalformat, int format_OR_width , int height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video, [int format, int type, TypedData pixels]) {
2405 if ((border_OR_canvas_OR_image_OR_pixels_OR_video is int || border_OR_canvas _OR_image_OR_pixels_OR_video == null)) { 2405 if ((border_OR_canvas_OR_image_OR_pixels_OR_video is int || border_OR_canvas _OR_image_OR_pixels_OR_video == null) && format != null && type != null) {
2406 _texImage2D_1(target, level, internalformat, format_OR_width, height_OR_ty pe, border_OR_canvas_OR_image_OR_pixels_OR_video, format, type, pixels); 2406 _texImage2D_1(target, level, internalformat, format_OR_width, height_OR_ty pe, border_OR_canvas_OR_image_OR_pixels_OR_video, format, type, pixels);
2407 return; 2407 return;
2408 } 2408 }
2409 if ((border_OR_canvas_OR_image_OR_pixels_OR_video is ImageData || border_OR_ canvas_OR_image_OR_pixels_OR_video == null) && !?format && !?type && !?pixels) { 2409 if ((border_OR_canvas_OR_image_OR_pixels_OR_video is ImageData || border_OR_ canvas_OR_image_OR_pixels_OR_video == null) && !?format && !?type && !?pixels) {
2410 var pixels_1 = _convertDartToNative_ImageData(border_OR_canvas_OR_image_OR _pixels_OR_video); 2410 var pixels_1 = _convertDartToNative_ImageData(border_OR_canvas_OR_image_OR _pixels_OR_video);
2411 _texImage2D_2(target, level, internalformat, format_OR_width, height_OR_ty pe, pixels_1); 2411 _texImage2D_2(target, level, internalformat, format_OR_width, height_OR_ty pe, pixels_1);
2412 return; 2412 return;
2413 } 2413 }
2414 if ((border_OR_canvas_OR_image_OR_pixels_OR_video is ImageElement || border_ OR_canvas_OR_image_OR_pixels_OR_video == null) && !?format && !?type && !?pixels ) { 2414 if ((border_OR_canvas_OR_image_OR_pixels_OR_video is ImageElement || border_ OR_canvas_OR_image_OR_pixels_OR_video == null) && !?format && !?type && !?pixels ) {
2415 _texImage2D_3(target, level, internalformat, format_OR_width, height_OR_ty pe, border_OR_canvas_OR_image_OR_pixels_OR_video); 2415 _texImage2D_3(target, level, internalformat, format_OR_width, height_OR_ty pe, border_OR_canvas_OR_image_OR_pixels_OR_video);
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
2450 @DocsEditable 2450 @DocsEditable
2451 void texParameterf(int target, int pname, num param) native; 2451 void texParameterf(int target, int pname, num param) native;
2452 2452
2453 @DomName('WebGLRenderingContext.texParameteri') 2453 @DomName('WebGLRenderingContext.texParameteri')
2454 @DocsEditable 2454 @DocsEditable
2455 void texParameteri(int target, int pname, int param) native; 2455 void texParameteri(int target, int pname, int param) native;
2456 2456
2457 @DomName('WebGLRenderingContext.texSubImage2D') 2457 @DomName('WebGLRenderingContext.texSubImage2D')
2458 @DocsEditable 2458 @DocsEditable
2459 void texSubImage2D(int target, int level, int xoffset, int yoffset, int format _OR_width, int height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video, [in t type, TypedData pixels]) { 2459 void texSubImage2D(int target, int level, int xoffset, int yoffset, int format _OR_width, int height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video, [in t type, TypedData pixels]) {
2460 if ((canvas_OR_format_OR_image_OR_pixels_OR_video is int || canvas_OR_format _OR_image_OR_pixels_OR_video == null)) { 2460 if ((canvas_OR_format_OR_image_OR_pixels_OR_video is int || canvas_OR_format _OR_image_OR_pixels_OR_video == null) && type != null) {
2461 _texSubImage2D_1(target, level, xoffset, yoffset, format_OR_width, height_ OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video, type, pixels); 2461 _texSubImage2D_1(target, level, xoffset, yoffset, format_OR_width, height_ OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video, type, pixels);
2462 return; 2462 return;
2463 } 2463 }
2464 if ((canvas_OR_format_OR_image_OR_pixels_OR_video is ImageData || canvas_OR_ format_OR_image_OR_pixels_OR_video == null) && !?type && !?pixels) { 2464 if ((canvas_OR_format_OR_image_OR_pixels_OR_video is ImageData || canvas_OR_ format_OR_image_OR_pixels_OR_video == null) && !?type && !?pixels) {
2465 var pixels_1 = _convertDartToNative_ImageData(canvas_OR_format_OR_image_OR _pixels_OR_video); 2465 var pixels_1 = _convertDartToNative_ImageData(canvas_OR_format_OR_image_OR _pixels_OR_video);
2466 _texSubImage2D_2(target, level, xoffset, yoffset, format_OR_width, height_ OR_type, pixels_1); 2466 _texSubImage2D_2(target, level, xoffset, yoffset, format_OR_width, height_ OR_type, pixels_1);
2467 return; 2467 return;
2468 } 2468 }
2469 if ((canvas_OR_format_OR_image_OR_pixels_OR_video is ImageElement || canvas_ OR_format_OR_image_OR_pixels_OR_video == null) && !?type && !?pixels) { 2469 if ((canvas_OR_format_OR_image_OR_pixels_OR_video is ImageElement || canvas_ OR_format_OR_image_OR_pixels_OR_video == null) && !?type && !?pixels) {
2470 _texSubImage2D_3(target, level, xoffset, yoffset, format_OR_width, height_ OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video); 2470 _texSubImage2D_3(target, level, xoffset, yoffset, format_OR_width, height_ OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video);
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
2675 } 2675 }
2676 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 2676 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2677 // for details. All rights reserved. Use of this source code is governed by a 2677 // for details. All rights reserved. Use of this source code is governed by a
2678 // BSD-style license that can be found in the LICENSE file. 2678 // BSD-style license that can be found in the LICENSE file.
2679 2679
2680 2680
2681 @DocsEditable 2681 @DocsEditable
2682 @DomName('WebGLVertexArrayObjectOES') 2682 @DomName('WebGLVertexArrayObjectOES')
2683 class VertexArrayObject native "WebGLVertexArrayObjectOES" { 2683 class VertexArrayObject native "WebGLVertexArrayObjectOES" {
2684 } 2684 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698