Skip to content

Commit bfc5f49

Browse files
committed
address @szager-chromium review comments
1 parent 5a802e7 commit bfc5f49

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

specs/latest/2.0/index.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,8 @@ <h3>Types</h3>
268268
typedef unsigned long long GLuint64;
269269

270270
dictionary WebGLCopyElementImageConfig {
271-
GLfloat sx = 0;
272-
GLfloat sy = 0;
271+
GLfloat sx;
272+
GLfloat sy;
273273
GLfloat swidth;
274274
GLfloat sheight;
275275
GLsizei width;
@@ -2234,8 +2234,8 @@ <h4>Texture objects</h4>
22342234
<p>If <code>target</code> is not <code>TEXTURE_2D</code>, generates an <code>INVALID_ENUM</code> error.</p>
22352235
<p>If no <code>WebGLTexture</code> is bound to <code>target</code>, generates an <code>INVALID_OPERATION</code> error.</p>
22362236
<p>If a <code>WebGLBuffer</code> is bound to the <code>PIXEL_UNPACK_BUFFER</code> target, generates an <code>INVALID_OPERATION</code> error.</p>
2237-
<p><code>config.sx</code> and <code>config.sy</code> are in CSS pixels and default to 0. <code>config.swidth</code> and <code>config.sheight</code> are in CSS pixels and default to the source's natural width minus <code>config.sx</code> and natural height minus <code>config.sy</code>, respectively. Together, these members define the source rectangle of the element image snapshot to render.</p>
2238-
<p><code>config.width</code> and <code>config.height</code> are in texels and define the generated texture size. If omitted, each dimension defaults to the source rectangle size scaled by the inverse of the canvas-grid-to-CSS scaling factor used to produce the element image snapshot.</p>
2237+
<p><code>config.sx</code>, <code>config.sy</code>, <code>config.swidth</code>, and <code>config.sheight</code> define the source rectangle of the element image snapshot to render, in CSS pixels. Either all four members must be supplied, or none of them. If none of them are supplied, the source rectangle defaults to the source's natural width and natural height, starting at the origin.</p>
2238+
<p><code>config.width</code> and <code>config.height</code> are in texels and define the generated texture size. Either both members must be supplied, or neither of them. If neither member is supplied, the texture width and height default to the source rectangle size scaled by the inverse of the canvas-grid-to-CSS scaling factor used to produce the element image snapshot.</p>
22392239
<p>The <code>internalformat</code> argument must be one of the values in the following table. Each value has an implied source format of <code>RGBA</code> and the listed implied source type:</p>
22402240
<table>
22412241
<tr><th>Internal Format</th><th>Implied Source Type</th></tr>
@@ -2245,6 +2245,7 @@ <h4>Texture objects</h4>
22452245
<tr><td>RGBA32F</td><td>FLOAT</td></tr>
22462246
</table>
22472247
<p>If <code>internalformat</code> is not listed in the table above, generates an <code>INVALID_ENUM</code> error.</p>
2248+
<p>If only some of <code>config.sx</code>, <code>config.sy</code>, <code>config.swidth</code>, and <code>config.sheight</code> are supplied, or if only one of <code>config.width</code> and <code>config.height</code> is supplied, generates an <code>INVALID_VALUE</code> error.</p>
22482249
<p>If any supplied numeric member of <code>config</code> is negative, or if the computed source rectangle width, source rectangle height, texture width, or texture height is not positive, generates an <code>INVALID_VALUE</code> error.</p>
22492250
<p>
22502251
If <a href="#PIXEL_STORE_PARAM_CONSTRAINTS">pixel store parameter constraints</a> are not met,

specs/latest/2.0/webgl2.idl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ typedef long long GLint64;
2828
typedef unsigned long long GLuint64;
2929

3030
dictionary WebGLCopyElementImageConfig {
31-
GLfloat sx = 0;
32-
GLfloat sy = 0;
31+
GLfloat sx;
32+
GLfloat sy;
3333
GLfloat swidth;
3434
GLfloat sheight;
3535
GLsizei width;

0 commit comments

Comments
 (0)