@@ -200,34 +200,38 @@ interface mixin CanvasDrawElementImage {
200200CanvasRenderingContext2D includes CanvasDrawElementImage;
201201OffscreenCanvasRenderingContext2D includes CanvasDrawElementImage;
202202
203+ dictionary WebGLCopyElementImageConfig {
204+ GLfloat sx;
205+ GLfloat sy;
206+ GLfloat swidth;
207+ GLfloat sheight;
208+ GLsizei width;
209+ GLsizei height;
210+ };
211+
203212partial interface WebGLRenderingContext {
204- void texElementImage2D(GLenum target, GLint level, GLint internalformat,
205- GLenum format, GLenum type, (Element or ElementImage) element);
206- void texElementImage2D(GLenum target, GLint level, GLint internalformat,
207- GLsizei width, GLsizei height, GLenum format,
208- GLenum type, (Element or ElementImage) element);
209- void texElementImage2D(GLenum target, GLint level, GLint internalformat,
210- GLfloat sx, GLfloat sy, GLfloat swidth, GLfloat sheight,
211- GLenum format, GLenum type, (Element or ElementImage) element);
212- void texElementImage2D(GLenum target, GLint level, GLint internalformat,
213- GLfloat sx, GLfloat sy, GLfloat swidth, GLfloat sheight,
214- GLsizei width, GLsizei height, GLenum format,
215- GLenum type, (Element or ElementImage) element);
213+ void texElementImage2D(GLenum target, GLenum internalformat,
214+ (Element or ElementImage) element,
215+ optional WebGLCopyElementImageConfig config = {});
216+ };
217+
218+ dictionary GPUCopyElementImageDestination {
219+ required GPUImageCopyTextureTagged destination;
220+ GPUIntegerCoordinate width;
221+ GPUIntegerCoordinate height;
222+ };
223+
224+ dictionary GPUCopyElementImageSource {
225+ required (Element or ElementImage) source;
226+ float sx;
227+ float sy;
228+ float swidth;
229+ float sheight;
216230};
217231
218232partial interface GPUQueue {
219- void copyElementImageToTexture((Element or ElementImage) source,
220- GPUImageCopyTextureTagged destination);
221- void copyElementImageToTexture((Element or ElementImage) source,
222- GPUIntegerCoordinate width, GPUIntegerCoordinate height,
223- GPUImageCopyTextureTagged destination);
224- void copyElementImageToTexture((Element or ElementImage) source,
225- float sx, float sy, float swidth, float sheight,
226- GPUImageCopyTextureTagged destination);
227- void copyElementImageToTexture((Element or ElementImage) source,
228- float sx, float sy, float swidth, float sheight,
229- GPUIntegerCoordinate width, GPUIntegerCoordinate height,
230- GPUImageCopyTextureTagged destination);
233+ void copyElementImageToTexture(GPUCopyElementImageSource source,
234+ GPUCopyElementImageDestination destination);
231235}
232236
233237[Exposed=Window]
0 commit comments