+2010-12-28 Zhenyao Mo <zmo@google.com>
+
+ Reviewed by Kenneth Russell.
+
+ Map GLsizei to long instead of unsigned long in WebGLRenderingContext and GraphicsContext3D
+ https://bugs.webkit.org/show_bug.cgi?id=39855
+
+ * fast/canvas/webgl/invalid-passed-params-expected.txt: Add test cases for negative offset/width/height.
+ * fast/canvas/webgl/invalid-passed-params.html: Ditto.
+
2010-12-28 Kenneth Russell <kbr@google.com>
Unreviewed, Chromium test expectations update. Mark
PASS context.bufferData(context.ARRAY_BUFFER, 16, desktopGL['STATIC_COPY']) generated expected GL error: INVALID_ENUM.
PASS context.bufferData(context.ARRAY_BUFFER, 16, desktopGL['DYNAMIC_READ']) generated expected GL error: INVALID_ENUM.
PASS context.bufferData(context.ARRAY_BUFFER, 16, desktopGL['DYNAMIC_COPY']) generated expected GL error: INVALID_ENUM.
+Test {copy}Tex{Sub}Image2D with negative offset/width/height
+PASS context.bindTexture(context.TEXTURE_2D, tex) generated expected GL error: NO_ERROR.
+PASS context.texImage2D(context.TEXTURE_2D, 0, context.RGBA, -16, -16, 0, context.RGBA, context.UNSIGNED_BYTE, null) generated expected GL error: INVALID_VALUE.
+PASS context.texImage2D(context.TEXTURE_2D, 0, context.RGBA, 16, 16, 0, context.RGBA, context.UNSIGNED_BYTE, null) generated expected GL error: NO_ERROR.
+PASS context.texSubImage2D(context.TEXTURE_2D, 0, -1, -1, 2, 2, context.RGBA, context.UNSIGNED_BYTE, pixels) generated expected GL error: INVALID_VALUE.
+PASS context.texSubImage2D(context.TEXTURE_2D, 0, 0, 0, -1, -1, context.RGBA, context.UNSIGNED_BYTE, pixels) generated expected GL error: INVALID_VALUE.
+PASS context.texSubImage2D(context.TEXTURE_2D, 0, 0, 0, 2, 2, context.RGBA, context.UNSIGNED_BYTE, pixels) generated expected GL error: NO_ERROR.
+PASS context.copyTexImage2D(context.TEXTURE_2D, 0, context.RGBA, 0, 0, -1, -1, 0) generated expected GL error: INVALID_VALUE.
+PASS context.copyTexImage2D(context.TEXTURE_2D, 0, context.RGBA, 0, 0, 16, 16, 0) generated expected GL error: NO_ERROR.
+PASS context.copyTexSubImage2D(context.TEXTURE_2D, 0, -1, -1, 0, 0, 2, 2) generated expected GL error: INVALID_VALUE.
+PASS context.copyTexSubImage2D(context.TEXTURE_2D, 0, 0, 0, 0, 0, -1, -1) generated expected GL error: INVALID_VALUE.
+PASS context.copyTexSubImage2D(context.TEXTURE_2D, 0, 0, 0, 0, 0, 2, 2) generated expected GL error: NO_ERROR.
+Test renderbufferStorage() with negative width/height
+PASS context.bindRenderbuffer(context.RENDERBUFFER, renderbuffer) generated expected GL error: NO_ERROR.
+PASS context.renderbufferStorage(context.RENDERBUFFER, context.RGBA4, -2, -2) generated expected GL error: INVALID_VALUE.
+PASS context.renderbufferStorage(context.RENDERBUFFER, context.RGBA4, 16, 16) generated expected GL error: NO_ERROR.
+Test scissor() with negative width/height
+PASS context.scissor(0, 0, -2, -2) generated expected GL error: INVALID_VALUE.
+PASS context.scissor(0, 0, 16, 16) generated expected GL error: NO_ERROR.
+Test viewport() with negative width/height
+PASS context.viewport(0, 0, -2, -2) generated expected GL error: INVALID_VALUE.
+PASS context.viewport(0, 0, 16, 16) generated expected GL error: NO_ERROR.
PASS successfullyParsed is true
shouldGenerateGLError(context, context.INVALID_ENUM, "context.bufferData(context.ARRAY_BUFFER, 16, desktopGL['DYNAMIC_READ'])");
shouldGenerateGLError(context, context.INVALID_ENUM, "context.bufferData(context.ARRAY_BUFFER, 16, desktopGL['DYNAMIC_COPY'])");
+debug("Test {copy}Tex{Sub}Image2D with negative offset/width/height");
+var tex = context.createTexture();
+var pixels = new Uint8Array(2 * 2 * 4);
+shouldGenerateGLError(context, context.NO_ERROR, "context.bindTexture(context.TEXTURE_2D, tex)");
+shouldGenerateGLError(context, context.INVALID_VALUE, "context.texImage2D(context.TEXTURE_2D, 0, context.RGBA, -16, -16, 0, context.RGBA, context.UNSIGNED_BYTE, null)");
+shouldGenerateGLError(context, context.NO_ERROR, "context.texImage2D(context.TEXTURE_2D, 0, context.RGBA, 16, 16, 0, context.RGBA, context.UNSIGNED_BYTE, null)");
+shouldGenerateGLError(context, context.INVALID_VALUE, "context.texSubImage2D(context.TEXTURE_2D, 0, -1, -1, 2, 2, context.RGBA, context.UNSIGNED_BYTE, pixels)");
+shouldGenerateGLError(context, context.INVALID_VALUE, "context.texSubImage2D(context.TEXTURE_2D, 0, 0, 0, -1, -1, context.RGBA, context.UNSIGNED_BYTE, pixels)");
+shouldGenerateGLError(context, context.NO_ERROR, "context.texSubImage2D(context.TEXTURE_2D, 0, 0, 0, 2, 2, context.RGBA, context.UNSIGNED_BYTE, pixels)");
+shouldGenerateGLError(context, context.INVALID_VALUE, "context.copyTexImage2D(context.TEXTURE_2D, 0, context.RGBA, 0, 0, -1, -1, 0)");
+shouldGenerateGLError(context, context.NO_ERROR, "context.copyTexImage2D(context.TEXTURE_2D, 0, context.RGBA, 0, 0, 16, 16, 0)");
+shouldGenerateGLError(context, context.INVALID_VALUE, "context.copyTexSubImage2D(context.TEXTURE_2D, 0, -1, -1, 0, 0, 2, 2)");
+shouldGenerateGLError(context, context.INVALID_VALUE, "context.copyTexSubImage2D(context.TEXTURE_2D, 0, 0, 0, 0, 0, -1, -1)");
+shouldGenerateGLError(context, context.NO_ERROR, "context.copyTexSubImage2D(context.TEXTURE_2D, 0, 0, 0, 0, 0, 2, 2)");
+
+debug("Test renderbufferStorage() with negative width/height");
+var renderbuffer = context.createRenderbuffer();
+shouldGenerateGLError(context, context.NO_ERROR, "context.bindRenderbuffer(context.RENDERBUFFER, renderbuffer)");
+shouldGenerateGLError(context, context.INVALID_VALUE, "context.renderbufferStorage(context.RENDERBUFFER, context.RGBA4, -2, -2)");
+shouldGenerateGLError(context, context.NO_ERROR, "context.renderbufferStorage(context.RENDERBUFFER, context.RGBA4, 16, 16)");
+
+debug("Test scissor() with negative width/height");
+shouldGenerateGLError(context, context.INVALID_VALUE, "context.scissor(0, 0, -2, -2)");
+shouldGenerateGLError(context, context.NO_ERROR, "context.scissor(0, 0, 16, 16)");
+
+debug("Test viewport() with negative width/height");
+shouldGenerateGLError(context, context.INVALID_VALUE, "context.viewport(0, 0, -2, -2)");
+shouldGenerateGLError(context, context.NO_ERROR, "context.viewport(0, 0, 16, 16)");
+
debug("")
successfullyParsed = true;
</script>
+2010-12-23 Zhenyao Mo <zmo@google.com>
+
+ Reviewed by Kenneth Russell.
+
+ Map GLsizei to long instead of unsigned long in WebGLRenderingContext and GraphicsContext3D
+ https://bugs.webkit.org/show_bug.cgi?id=39855
+
+ * html/canvas/WebGLRenderingContext.cpp:
+ (WebCore::WebGLRenderingContext::copyTexImage2D): Map GLsizei to long.
+ (WebCore::WebGLRenderingContext::copyTexSubImage2D): Ditto.
+ (WebCore::WebGLRenderingContext::renderbufferStorage): Ditto.
+ (WebCore::WebGLRenderingContext::scissor): Ditto.
+ (WebCore::WebGLRenderingContext::texImage2DBase): Ditto.
+ (WebCore::WebGLRenderingContext::texImage2D): Ditto.
+ (WebCore::WebGLRenderingContext::texSubImage2DBase): Ditto.
+ (WebCore::WebGLRenderingContext::texSubImage2DImpl): Ditto.
+ (WebCore::WebGLRenderingContext::texSubImage2D): Ditto.
+ (WebCore::WebGLRenderingContext::viewport): Ditto.
+ (WebCore::WebGLRenderingContext::validateSize): Check the sizes are non-negative.
+ * html/canvas/WebGLRenderingContext.h:
+ * html/canvas/WebGLRenderingContext.idl:
+
2010-12-28 Abhishek Arya <inferno@chromium.org>
Reviewed by Kenneth Russell.
cleanupAfterGraphicsCall(false);
}
-void WebGLRenderingContext::copyTexImage2D(unsigned long target, long level, unsigned long internalformat, long x, long y, unsigned long width, unsigned long height, long border)
+void WebGLRenderingContext::copyTexImage2D(unsigned long target, long level, unsigned long internalformat, long x, long y, long width, long height, long border)
{
if (isContextLost())
return;
cleanupAfterGraphicsCall(false);
}
-void WebGLRenderingContext::copyTexSubImage2D(unsigned long target, long level, long xoffset, long yoffset, long x, long y, unsigned long width, unsigned long height)
+void WebGLRenderingContext::copyTexSubImage2D(unsigned long target, long level, long xoffset, long yoffset, long x, long y, long width, long height)
{
if (isContextLost())
return;
WebGLTexture* tex = validateTextureBinding(target, true);
if (!tex)
return;
+ if (!validateSize(xoffset, yoffset) || !validateSize(width, height))
+ return;
if (!isTexInternalFormatColorBufferCombinationValid(tex->getInternalFormat(level), getBoundFramebufferColorFormat())) {
m_context->synthesizeGLError(GraphicsContext3D::INVALID_OPERATION);
return;
cleanupAfterGraphicsCall(false);
}
-void WebGLRenderingContext::renderbufferStorage(unsigned long target, unsigned long internalformat, unsigned long width, unsigned long height)
+void WebGLRenderingContext::renderbufferStorage(unsigned long target, unsigned long internalformat, long width, long height)
{
if (isContextLost())
return;
m_context->synthesizeGLError(GraphicsContext3D::INVALID_OPERATION);
return;
}
+ if (!validateSize(width, height))
+ return;
switch (internalformat) {
case GraphicsContext3D::DEPTH_COMPONENT16:
case GraphicsContext3D::RGBA4:
cleanupAfterGraphicsCall(false);
}
-void WebGLRenderingContext::scissor(long x, long y, unsigned long width, unsigned long height)
+void WebGLRenderingContext::scissor(long x, long y, long width, long height)
{
if (isContextLost())
return;
+ if (!validateSize(width, height))
+ return;
m_context->scissor(x, y, width, height);
cleanupAfterGraphicsCall(false);
}
}
void WebGLRenderingContext::texImage2DBase(unsigned target, unsigned level, unsigned internalformat,
- unsigned width, unsigned height, unsigned border,
+ int width, int height, unsigned border,
unsigned format, unsigned type, void* pixels, ExceptionCode& ec)
{
// FIXME: For now we ignore any errors returned
}
void WebGLRenderingContext::texImage2D(unsigned target, unsigned level, unsigned internalformat,
- unsigned width, unsigned height, unsigned border,
+ int width, int height, unsigned border,
unsigned format, unsigned type, ArrayBufferView* pixels, ExceptionCode& ec)
{
if (isContextLost() || !validateTexFuncData(width, height, format, type, pixels))
texParameter(target, pname, 0, param, false);
}
-void WebGLRenderingContext::texSubImage2DBase(unsigned target, unsigned level, unsigned xoffset, unsigned yoffset,
- unsigned width, unsigned height,
+void WebGLRenderingContext::texSubImage2DBase(unsigned target, unsigned level, int xoffset, int yoffset,
+ int width, int height,
unsigned format, unsigned type, void* pixels, ExceptionCode& ec)
{
// FIXME: For now we ignore any errors returned
return;
if (!validateTextureBinding(target, true))
return;
+ if (!validateSize(xoffset, yoffset) || !validateSize(width, height))
+ return;
m_context->texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
cleanupAfterGraphicsCall(false);
}
-void WebGLRenderingContext::texSubImage2DImpl(unsigned target, unsigned level, unsigned xoffset, unsigned yoffset,
+void WebGLRenderingContext::texSubImage2DImpl(unsigned target, unsigned level, int xoffset, int yoffset,
unsigned format, unsigned type,
Image* image, bool flipY, bool premultiplyAlpha, ExceptionCode& ec)
{
format, type, data.data(), ec);
}
-void WebGLRenderingContext::texSubImage2D(unsigned target, unsigned level, unsigned xoffset, unsigned yoffset,
- unsigned width, unsigned height,
+void WebGLRenderingContext::texSubImage2D(unsigned target, unsigned level, int xoffset, int yoffset,
+ int width, int height,
unsigned format, unsigned type, ArrayBufferView* pixels, ExceptionCode& ec)
{
if (isContextLost() || !validateTexFuncData(width, height, format, type, pixels))
m_context->pixelStorei(GraphicsContext3D::UNPACK_ALIGNMENT, m_unpackAlignment);
}
-void WebGLRenderingContext::texSubImage2D(unsigned target, unsigned level, unsigned xoffset, unsigned yoffset,
+void WebGLRenderingContext::texSubImage2D(unsigned target, unsigned level, int xoffset, int yoffset,
unsigned format, unsigned type, ImageData* pixels, ExceptionCode& ec)
{
ec = 0;
format, type, data.data(), ec);
}
-void WebGLRenderingContext::texSubImage2D(unsigned target, unsigned level, unsigned xoffset, unsigned yoffset,
+void WebGLRenderingContext::texSubImage2D(unsigned target, unsigned level, int xoffset, int yoffset,
unsigned format, unsigned type, HTMLImageElement* image, ExceptionCode& ec)
{
ec = 0;
m_unpackFlipY, m_unpackPremultiplyAlpha, ec);
}
-void WebGLRenderingContext::texSubImage2D(unsigned target, unsigned level, unsigned xoffset, unsigned yoffset,
+void WebGLRenderingContext::texSubImage2D(unsigned target, unsigned level, int xoffset, int yoffset,
unsigned format, unsigned type, HTMLCanvasElement* canvas, ExceptionCode& ec)
{
ec = 0;
m_unpackFlipY, m_unpackPremultiplyAlpha, ec);
}
-void WebGLRenderingContext::texSubImage2D(unsigned target, unsigned level, unsigned xoffset, unsigned yoffset,
+void WebGLRenderingContext::texSubImage2D(unsigned target, unsigned level, int xoffset, int yoffset,
unsigned format, unsigned type, HTMLVideoElement* video, ExceptionCode& ec)
{
ec = 0;
cleanupAfterGraphicsCall(false);
}
-void WebGLRenderingContext::viewport(long x, long y, unsigned long width, unsigned long height)
+void WebGLRenderingContext::viewport(long x, long y, long width, long height)
{
if (isContextLost())
return;
width = 100;
if (isnan(height))
height = 100;
+ if (!validateSize(width, height))
+ return;
m_context->viewport(x, y, width, height);
cleanupAfterGraphicsCall(false);
}
return tex;
}
+bool WebGLRenderingContext::validateSize(long x, long y)
+{
+ if (x < 0 || y < 0) {
+ m_context->synthesizeGLError(GraphicsContext3D::INVALID_VALUE);
+ return false;
+ }
+ return true;
+}
+
bool WebGLRenderingContext::validateTexFuncFormatAndType(unsigned long format, unsigned long type)
{
switch (format) {
// void compressedTexImage2D(unsigned long target, long level, unsigned long internalformat, unsigned long width, unsigned long height, long border, unsigned long imageSize, const void* data);
// void compressedTexSubImage2D(unsigned long target, long level, long xoffset, long yoffset, unsigned long width, unsigned long height, unsigned long format, unsigned long imageSize, const void* data);
- void copyTexImage2D(unsigned long target, long level, unsigned long internalformat, long x, long y, unsigned long width, unsigned long height, long border);
- void copyTexSubImage2D(unsigned long target, long level, long xoffset, long yoffset, long x, long y, unsigned long width, unsigned long height);
+ void copyTexImage2D(unsigned long target, long level, unsigned long internalformat, long x, long y, long width, long height, long border);
+ void copyTexSubImage2D(unsigned long target, long level, long xoffset, long yoffset, long x, long y, long width, long height);
PassRefPtr<WebGLBuffer> createBuffer();
PassRefPtr<WebGLFramebuffer> createFramebuffer();
void polygonOffset(double factor, double units);
void readPixels(long x, long y, long width, long height, unsigned long format, unsigned long type, ArrayBufferView* pixels, ExceptionCode&);
void releaseShaderCompiler();
- void renderbufferStorage(unsigned long target, unsigned long internalformat, unsigned long width, unsigned long height);
+ void renderbufferStorage(unsigned long target, unsigned long internalformat, long width, long height);
void sampleCoverage(double value, bool invert);
- void scissor(long x, long y, unsigned long width, unsigned long height);
+ void scissor(long x, long y, long width, long height);
void shaderSource(WebGLShader*, const String&, ExceptionCode&);
void stencilFunc(unsigned long func, long ref, unsigned long mask);
void stencilFuncSeparate(unsigned long face, unsigned long func, long ref, unsigned long mask);
void stencilOpSeparate(unsigned long face, unsigned long fail, unsigned long zfail, unsigned long zpass);
void texImage2D(unsigned target, unsigned level, unsigned internalformat,
- unsigned width, unsigned height, unsigned border,
+ int width, int height, unsigned border,
unsigned format, unsigned type, ArrayBufferView* pixels, ExceptionCode&);
void texImage2D(unsigned target, unsigned level, unsigned internalformat,
unsigned format, unsigned type, ImageData* pixels, ExceptionCode&);
void texParameterf(unsigned target, unsigned pname, float param);
void texParameteri(unsigned target, unsigned pname, int param);
- void texSubImage2D(unsigned target, unsigned level, unsigned xoffset, unsigned yoffset,
- unsigned width, unsigned height,
+ void texSubImage2D(unsigned target, unsigned level, int xoffset, int yoffset,
+ int width, int height,
unsigned format, unsigned type, ArrayBufferView* pixels, ExceptionCode&);
- void texSubImage2D(unsigned target, unsigned level, unsigned xoffset, unsigned yoffset,
+ void texSubImage2D(unsigned target, unsigned level, int xoffset, int yoffset,
unsigned format, unsigned type, ImageData* pixels, ExceptionCode&);
- void texSubImage2D(unsigned target, unsigned level, unsigned xoffset, unsigned yoffset,
+ void texSubImage2D(unsigned target, unsigned level, int xoffset, int yoffset,
unsigned format, unsigned type, HTMLImageElement* image, ExceptionCode&);
- void texSubImage2D(unsigned target, unsigned level, unsigned xoffset, unsigned yoffset,
+ void texSubImage2D(unsigned target, unsigned level, int xoffset, int yoffset,
unsigned format, unsigned type, HTMLCanvasElement* canvas, ExceptionCode&);
- void texSubImage2D(unsigned target, unsigned level, unsigned xoffset, unsigned yoffset,
+ void texSubImage2D(unsigned target, unsigned level, int xoffset, int yoffset,
unsigned format, unsigned type, HTMLVideoElement* video, ExceptionCode&);
void uniform1f(const WebGLUniformLocation* location, float x, ExceptionCode&);
void vertexAttribPointer(unsigned long index, long size, unsigned long type, bool normalized,
long stride, long offset, ExceptionCode&);
- void viewport(long x, long y, unsigned long width, unsigned long height);
+ void viewport(long x, long y, long width, long height);
void loseContext();
void restoreContext();
WebGLGetInfo getWebGLIntArrayParameter(unsigned long pname);
void texImage2DBase(unsigned target, unsigned level, unsigned internalformat,
- unsigned width, unsigned height, unsigned border,
+ int width, int height, unsigned border,
unsigned format, unsigned type, void* pixels, ExceptionCode&);
void texImage2DImpl(unsigned target, unsigned level, unsigned internalformat,
unsigned format, unsigned type, Image* image,
bool flipY, bool premultiplyAlpha, ExceptionCode&);
- void texSubImage2DBase(unsigned target, unsigned level, unsigned xoffset, unsigned yoffset,
- unsigned width, unsigned height,
+ void texSubImage2DBase(unsigned target, unsigned level, int xoffset, int yoffset,
+ int width, int height,
unsigned format, unsigned type, void* pixels, ExceptionCode&);
- void texSubImage2DImpl(unsigned target, unsigned level, unsigned xoffset, unsigned yoffset,
+ void texSubImage2DImpl(unsigned target, unsigned level, int xoffset, int yoffset,
unsigned format, unsigned type,
Image* image, bool flipY, bool premultiplyAlpha, ExceptionCode&);
// Helper function to get the bound framebuffer's color buffer format.
unsigned long getBoundFramebufferColorFormat();
+ // Helper function to check if size is non-negative.
+ // Generate GL error and return false for negative inputs; otherwise, return true.
+ bool validateSize(long x, long y);
+
// Helper function to check target and texture bound to the target.
// Generate GL errors and return 0 if target is invalid or texture bound is
// null. Otherwise, return the texture bound to the target.
//void compressedTexImage2D(in unsigned long target, in long level, in unsigned long internalformat, in unsigned long width, in unsigned long height, in long border, in unsigned long imageSize, const void* data);
//void compressedTexSubImage2D(in unsigned long target, in long level, in long xoffset, in long yoffset, in unsigned long width, in unsigned long height, in unsigned long format, in unsigned long imageSize, const void* data);
- [StrictTypeChecking] void copyTexImage2D(in unsigned long target, in long level, in unsigned long internalformat, in long x, in long y, in unsigned long width, in unsigned long height, in long border);
- [StrictTypeChecking] void copyTexSubImage2D(in unsigned long target, in long level, in long xoffset, in long yoffset, in long x, in long y, in unsigned long width, in unsigned long height);
+ [StrictTypeChecking] void copyTexImage2D(in unsigned long target, in long level, in unsigned long internalformat, in long x, in long y, in long width, in long height, in long border);
+ [StrictTypeChecking] void copyTexSubImage2D(in unsigned long target, in long level, in long xoffset, in long yoffset, in long x, in long y, in long width, in long height);
[StrictTypeChecking] WebGLBuffer createBuffer();
[StrictTypeChecking] WebGLFramebuffer createFramebuffer();
[StrictTypeChecking] void readPixels(in long x, in long y, in long width, in long height, in unsigned long format, in unsigned long type, in ArrayBufferView pixels) raises(DOMException);
[StrictTypeChecking] void releaseShaderCompiler();
- [StrictTypeChecking] void renderbufferStorage(in unsigned long target, in unsigned long internalformat, in unsigned long width, in unsigned long height);
+ [StrictTypeChecking] void renderbufferStorage(in unsigned long target, in unsigned long internalformat, in long width, in long height);
[StrictTypeChecking] void sampleCoverage(in double value, in boolean invert);
- [StrictTypeChecking] void scissor(in long x, in long y, in unsigned long width, in unsigned long height);
+ [StrictTypeChecking] void scissor(in long x, in long y, in long width, in long height);
[StrictTypeChecking] void shaderSource(in WebGLShader shader, in DOMString string) raises(DOMException);
[StrictTypeChecking] void stencilFunc(in unsigned long func, in long ref, in unsigned long mask);
[StrictTypeChecking] void stencilFuncSeparate(in unsigned long face, in unsigned long func, in long ref, in unsigned long mask);
[StrictTypeChecking] void vertexAttrib4f(in unsigned long indx, in float x, in float y, in float z, in float w);
[StrictTypeChecking, Custom] void vertexAttrib4fv(in unsigned long indx, in Float32Array values);
[StrictTypeChecking] void vertexAttribPointer(in unsigned long indx, in long size, in unsigned long type, in boolean normalized,
- in long stride, in unsigned long offset) raises(DOMException);
+ in long stride, in long offset) raises(DOMException);
- [StrictTypeChecking] void viewport(in long x, in long y, in unsigned long width, in unsigned long height);
+ [StrictTypeChecking] void viewport(in long x, in long y, in long width, in long height);
};
}