diff --git a/specs/latest/1.0/index.html b/specs/latest/1.0/index.html
index b941de3604..b4c8cd91a5 100644
--- a/specs/latest/1.0/index.html
+++ b/specs/latest/1.0/index.html
@@ -1721,6 +1721,8 @@
[Exposed=Worker] readonly attribute OffscreenCanvas canvas;
readonly attribute GLsizei drawingBufferWidth;
readonly attribute GLsizei drawingBufferHeight;
+ attribute PredefinedColorSpace drawingBufferColorSpace = "srgb";
+ attribute PredefinedColorSpace unpackColorSpace = "srgb";
[WebGLHandlesContextLoss] WebGLContextAttributes? getContextAttributes();
[WebGLHandlesContextLoss] boolean isContextLost();
@@ -1979,6 +1981,33 @@ Attributes
The actual height of the drawing buffer. May be different from the
height
attribute of the HTMLCanvasElement
if
the implementation is unable to satisfy the requested width or height.
+
+
+
+ drawingBufferColorSpace
+
+
+ of type PredefinedColorSpace
+ (specification)
+
+ The color space used to interpret the drawing buffer's content values.
+ Changing this attribute causes the drawing buffer to be reallocated; its
+ current contents are lost. This attribute affects the on-screen display
+ of the rendering context, and the interpretation of this context's
+ drawing buffer when it is drawn to a 2D canvas context, or uploaded to
+ textures in another WebGL or WebGPU rendering
+ context.
+
+
+
+ unpackColorSpace
+
+
+ of type PredefinedColorSpace
+ (specification)
+
+ The color space into which TexImageSource
sources are
+ converted when uploading them to textures in this context.
@@ -2653,10 +2682,27 @@ Texture objects
The width and height of the texture are set as specified in section
Texture Upload Width and Height.
- The source image data is conceptually first converted to the data type and format
- specified by the format and type arguments, and then transferred to
- the WebGL implementation. Format conversion is performed according to the following table.
- If a packed pixel format is specified which would imply loss of bits of precision from the
+ First, the source image data is conceptually converted to the color space specified by
+ the unpackColorSpace
+ attribute, except if the source image data is an HTMLImageElement
, and
+ the UNPACK_COLORSPACE_CONVERSION_WEBGL
pixel storage parameter is set
+ to NONE
.
+
+
+
+ This color space conversion applies to ImageBitmap
objects as well, though
+ other texture unpack parameters do not apply to ImageBitmap
s because they
+ are expected to be specified during ImageBitmap
construction.
+ Implementation experience revealed that it was beneficial to
+ perform ImageBitmap
s' color space conversion as late as possible when
+ uploading to WebGL textures.
+
+
+
+ Next, the source image data is converted to the data type and format specified by
+ the format and type arguments, and then transferred to the WebGL
+ implementation. Format conversion is performed according to the following table. If a
+ packed pixel format is specified which would imply loss of bits of precision from the
image data, this loss of precision must occur.
@@ -2799,12 +2845,8 @@ Texture objects
Texture Upload Width and Height.
See texImage2D for the interpretation of
- the format and type arguments, and notes on
- the UNPACK_PREMULTIPLY_ALPHA_WEBGL
pixel storage parameter.
-
- See Pixel Storage Parameters for WebGL-specific
- pixel storage parameters that affect the behavior of this function when it is called
- with any argument type other than ImageBitmap
.
+ the format and type arguments, handling of WebGL-specific pixel
+ storage parameters, and potential color space transformations of the input.
The first pixel transferred from the source to the WebGL implementation corresponds
to the upper left corner of the source. This behavior is modified by the
@@ -4555,6 +4597,16 @@ References
(Non-normative) WebCodecs API,
C. Cunningham, P. Adenot, B. Aboba. W3C.
+ [PREDEFINEDCOLORSPACE]
+
+ HTML Living Standard - The PredefinedColorSpace enum,
+ WHATWG.
+
+ [WEBGPU]
+
+ WebGPU Editor's Draft,
+ WebGPU Community Group.
+