Преглед на файлове

Merge pull request #14718 from troy351/dev

ImageUtils: Remove usage of OffscreenCanvas in .getDataURL()
Mr.doob преди 7 години
родител
ревизия
8403e31ca5
променени са 1 файла, в които са добавени 4 реда и са изтрити 11 реда
  1. 4 11
      src/extras/ImageUtils.js

+ 4 - 11
src/extras/ImageUtils.js

@@ -16,17 +16,10 @@ var ImageUtils = {
 
 		} else {
 
-			if ( typeof OffscreenCanvas !== 'undefined' ) {
-
-				canvas = new OffscreenCanvas( image.width, image.height );
-
-			} else {
-
-				canvas = document.createElementNS( 'http://www.w3.org/1999/xhtml', 'canvas' );
-				canvas.width = image.width;
-				canvas.height = image.height;
-
-			}
+			// do not use OffscreenCanvas here, see #14713
+			canvas = document.createElementNS( 'http://www.w3.org/1999/xhtml', 'canvas' );
+			canvas.width = image.width;
+			canvas.height = image.height;
 
 			var context = canvas.getContext( '2d' );