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

Unified Diff: sdk/lib/web_gl/dartium/web_gl_dartium.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 side-by-side diff with in-line comments
Download patch
Index: sdk/lib/web_gl/dartium/web_gl_dartium.dart
diff --git a/sdk/lib/web_gl/dartium/web_gl_dartium.dart b/sdk/lib/web_gl/dartium/web_gl_dartium.dart
index 31db3819a0141ec43f3ae8fef83741ae60597051..48e08084929dd605961cfe013294eb946a423663 100644
--- a/sdk/lib/web_gl/dartium/web_gl_dartium.dart
+++ b/sdk/lib/web_gl/dartium/web_gl_dartium.dart
@@ -2147,15 +2147,15 @@ class RenderingContext extends CanvasRenderingContext {
void blendFuncSeparate(int srcRGB, int dstRGB, int srcAlpha, int dstAlpha) native "WebGLRenderingContext_blendFuncSeparate_Callback";
void bufferData(int target, data_OR_size, int usage) {
- if ((target is int || target == null) && (data_OR_size is TypedData || data_OR_size == null) && (usage is int || usage == null)) {
+ if (usage is int && data_OR_size is TypedData && data_OR_size != null && target is int) {
_bufferData_1(target, data_OR_size, usage);
return;
}
- if ((target is int || target == null) && (data_OR_size is ByteBuffer || data_OR_size == null) && (usage is int || usage == null)) {
+ if (usage is int && data_OR_size is ByteBuffer && data_OR_size != null && target is int) {
_bufferData_2(target, data_OR_size, usage);
return;
}
- if ((target is int || target == null) && (data_OR_size is int || data_OR_size == null) && (usage is int || usage == null)) {
+ if (usage is int && data_OR_size is int && data_OR_size != null && target is int) {
_bufferData_3(target, data_OR_size, usage);
return;
}
@@ -2169,11 +2169,11 @@ class RenderingContext extends CanvasRenderingContext {
void _bufferData_3(target, data_OR_size, usage) native "WebGLRenderingContext__bufferData_3_Callback";
void bufferSubData(int target, int offset, data) {
- if ((target is int || target == null) && (offset is int || offset == null) && (data is TypedData || data == null)) {
+ if (data is TypedData && data != null && offset is int && target is int) {
_bufferSubData_1(target, offset, data);
return;
}
- if ((target is int || target == null) && (offset is int || offset == null) && (data is ByteBuffer || data == null)) {
+ if (data is ByteBuffer && data != null && offset is int && target is int) {
_bufferSubData_2(target, offset, data);
return;
}
@@ -2537,23 +2537,23 @@ class RenderingContext extends CanvasRenderingContext {
void stencilOpSeparate(int face, int fail, int zfail, int zpass) native "WebGLRenderingContext_stencilOpSeparate_Callback";
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]) {
- if ((target is int || target == null) && (level is int || level == null) && (internalformat is int || internalformat == null) && (format_OR_width is int || format_OR_width == null) && (height_OR_type is int || height_OR_type == null) && (border_OR_canvas_OR_image_OR_pixels_OR_video is int || border_OR_canvas_OR_image_OR_pixels_OR_video == null) && (format is int || format == null) && (type is int || type == null) && (pixels is TypedData || pixels == null)) {
+ if (pixels is TypedData && pixels != null && type is int && format is int && border_OR_canvas_OR_image_OR_pixels_OR_video is int && border_OR_canvas_OR_image_OR_pixels_OR_video != null && height_OR_type is int && height_OR_type != null && format_OR_width is int && format_OR_width != null && internalformat is int && level is int && target is int) {
_texImage2D_1(target, level, internalformat, format_OR_width, height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video, format, type, pixels);
return;
}
- if ((target is int || target == null) && (level is int || level == null) && (internalformat is int || internalformat == null) && (format_OR_width is int || format_OR_width == null) && (height_OR_type is int || height_OR_type == null) && (border_OR_canvas_OR_image_OR_pixels_OR_video is ImageData || border_OR_canvas_OR_image_OR_pixels_OR_video == null) && !?format && !?type && !?pixels) {
+ if (border_OR_canvas_OR_image_OR_pixels_OR_video is ImageData && border_OR_canvas_OR_image_OR_pixels_OR_video != null && height_OR_type is int && format_OR_width is int && internalformat is int && level is int && target is int && !?format && !?type && !?pixels) {
_texImage2D_2(target, level, internalformat, format_OR_width, height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video);
return;
}
- if ((target is int || target == null) && (level is int || level == null) && (internalformat is int || internalformat == null) && (format_OR_width is int || format_OR_width == null) && (height_OR_type is int || height_OR_type == null) && (border_OR_canvas_OR_image_OR_pixels_OR_video is ImageElement || border_OR_canvas_OR_image_OR_pixels_OR_video == null) && !?format && !?type && !?pixels) {
+ if (border_OR_canvas_OR_image_OR_pixels_OR_video is ImageElement && border_OR_canvas_OR_image_OR_pixels_OR_video != null && height_OR_type is int && format_OR_width is int && internalformat is int && level is int && target is int && !?format && !?type && !?pixels) {
_texImage2D_3(target, level, internalformat, format_OR_width, height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video);
return;
}
- if ((target is int || target == null) && (level is int || level == null) && (internalformat is int || internalformat == null) && (format_OR_width is int || format_OR_width == null) && (height_OR_type is int || height_OR_type == null) && (border_OR_canvas_OR_image_OR_pixels_OR_video is CanvasElement || border_OR_canvas_OR_image_OR_pixels_OR_video == null) && !?format && !?type && !?pixels) {
+ if (border_OR_canvas_OR_image_OR_pixels_OR_video is CanvasElement && border_OR_canvas_OR_image_OR_pixels_OR_video != null && height_OR_type is int && format_OR_width is int && internalformat is int && level is int && target is int && !?format && !?type && !?pixels) {
_texImage2D_4(target, level, internalformat, format_OR_width, height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video);
return;
}
- if ((target is int || target == null) && (level is int || level == null) && (internalformat is int || internalformat == null) && (format_OR_width is int || format_OR_width == null) && (height_OR_type is int || height_OR_type == null) && (border_OR_canvas_OR_image_OR_pixels_OR_video is VideoElement || border_OR_canvas_OR_image_OR_pixels_OR_video == null) && !?format && !?type && !?pixels) {
+ if (border_OR_canvas_OR_image_OR_pixels_OR_video is VideoElement && border_OR_canvas_OR_image_OR_pixels_OR_video != null && height_OR_type is int && format_OR_width is int && internalformat is int && level is int && target is int && !?format && !?type && !?pixels) {
_texImage2D_5(target, level, internalformat, format_OR_width, height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video);
return;
}
@@ -2579,23 +2579,23 @@ class RenderingContext extends CanvasRenderingContext {
void texParameteri(int target, int pname, int param) native "WebGLRenderingContext_texParameteri_Callback";
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, [int type, TypedData pixels]) {
- if ((target is int || target == null) && (level is int || level == null) && (xoffset is int || xoffset == null) && (yoffset is int || yoffset == null) && (format_OR_width is int || format_OR_width == null) && (height_OR_type is int || height_OR_type == null) && (canvas_OR_format_OR_image_OR_pixels_OR_video is int || canvas_OR_format_OR_image_OR_pixels_OR_video == null) && (type is int || type == null) && (pixels is TypedData || pixels == null)) {
+ if (pixels is TypedData && pixels != null && type is int && canvas_OR_format_OR_image_OR_pixels_OR_video is int && height_OR_type is int && height_OR_type != null && format_OR_width is int && format_OR_width != null && yoffset is int && xoffset is int && level is int && target is int) {
_texSubImage2D_1(target, level, xoffset, yoffset, format_OR_width, height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video, type, pixels);
return;
}
- if ((target is int || target == null) && (level is int || level == null) && (xoffset is int || xoffset == null) && (yoffset is int || yoffset == null) && (format_OR_width is int || format_OR_width == null) && (height_OR_type is int || height_OR_type == null) && (canvas_OR_format_OR_image_OR_pixels_OR_video is ImageData || canvas_OR_format_OR_image_OR_pixels_OR_video == null) && !?type && !?pixels) {
+ if (canvas_OR_format_OR_image_OR_pixels_OR_video is ImageData && canvas_OR_format_OR_image_OR_pixels_OR_video != null && height_OR_type is int && format_OR_width is int && yoffset is int && xoffset is int && level is int && target is int && !?type && !?pixels) {
_texSubImage2D_2(target, level, xoffset, yoffset, format_OR_width, height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video);
return;
}
- if ((target is int || target == null) && (level is int || level == null) && (xoffset is int || xoffset == null) && (yoffset is int || yoffset == null) && (format_OR_width is int || format_OR_width == null) && (height_OR_type is int || height_OR_type == null) && (canvas_OR_format_OR_image_OR_pixels_OR_video is ImageElement || canvas_OR_format_OR_image_OR_pixels_OR_video == null) && !?type && !?pixels) {
+ if (canvas_OR_format_OR_image_OR_pixels_OR_video is ImageElement && canvas_OR_format_OR_image_OR_pixels_OR_video != null && height_OR_type is int && format_OR_width is int && yoffset is int && xoffset is int && level is int && target is int && !?type && !?pixels) {
_texSubImage2D_3(target, level, xoffset, yoffset, format_OR_width, height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video);
return;
}
- if ((target is int || target == null) && (level is int || level == null) && (xoffset is int || xoffset == null) && (yoffset is int || yoffset == null) && (format_OR_width is int || format_OR_width == null) && (height_OR_type is int || height_OR_type == null) && (canvas_OR_format_OR_image_OR_pixels_OR_video is CanvasElement || canvas_OR_format_OR_image_OR_pixels_OR_video == null) && !?type && !?pixels) {
+ if (canvas_OR_format_OR_image_OR_pixels_OR_video is CanvasElement && canvas_OR_format_OR_image_OR_pixels_OR_video != null && height_OR_type is int && format_OR_width is int && yoffset is int && xoffset is int && level is int && target is int && !?type && !?pixels) {
_texSubImage2D_4(target, level, xoffset, yoffset, format_OR_width, height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video);
return;
}
- if ((target is int || target == null) && (level is int || level == null) && (xoffset is int || xoffset == null) && (yoffset is int || yoffset == null) && (format_OR_width is int || format_OR_width == null) && (height_OR_type is int || height_OR_type == null) && (canvas_OR_format_OR_image_OR_pixels_OR_video is VideoElement || canvas_OR_format_OR_image_OR_pixels_OR_video == null) && !?type && !?pixels) {
+ if (canvas_OR_format_OR_image_OR_pixels_OR_video is VideoElement && canvas_OR_format_OR_image_OR_pixels_OR_video != null && height_OR_type is int && format_OR_width is int && yoffset is int && xoffset is int && level is int && target is int && !?type && !?pixels) {
_texSubImage2D_5(target, level, xoffset, yoffset, format_OR_width, height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video);
return;
}

Powered by Google App Engine
This is Rietveld 408576698