From 1328391a3b80540dc0a5c811a0937247ac9ca1ec Mon Sep 17 00:00:00 2001
From: Kenneth Russell If the If the alpha
setting is
provided and set to false, then the canvas is forced to always be opaque.lowLatency
+ setting is provided and set to true, then the user agent will attempt to optimize the rendering
+ of the canvas to reduce latency, including potentially rendering from the front buffer. This
+ might desynchronize the canvas's display from the rest of the page and induce tearing on some
+ displays.canvas
The CanvasRenderingContext2D
object also has a lowLatency flag, which can be set to true or false.
+ Initially, when the context is created, its lowLatency flag must be set to false. When a
+ CanvasRenderingContext2D
object has its lowLatency flag set to true, then the user agent will
+ attempt to optimize the rendering of the canvas to reduce latency, including potentially rendering
+ from the front buffer. This might desynchronize the canvas's display from the rest of the page and
+ induce tearing on some displays.
The lowLatency
setting is useful
+ and necessary when implementing certain kinds of applications, such as drawing applications, where
+ the delay between input and rasterization is critical.
The getContextAttributes()
method,
- when invoked, must return a CanvasRenderingContext2DSettings
dictionary whose alpha
member is set to true if this context's alpha flag is set, and false otherwise.
CanvasRenderingContext2DSettings
dictionary containing
+ the following members:
+
+ alpha
, set to true if this context's alpha flag is set, and false otherwise.
lowLatency
, set to true if this context's
+ lowLatency flag is set, and false
+ otherwise.
alpha
lowLatency
getContext
('2d' [, { [ alpha
: false ] } ] )getContext
('2d' [, { [ alpha
: false ] [, lowLatency
: true ] } ] )If the lowLatency
- setting is provided and set to true, then the user agent will attempt to optimize the rendering
- of the canvas to reduce latency, including potentially rendering from the front buffer. This
- might desynchronize the canvas's display from the rest of the page and induce tearing on some
- displays.
CanvasRenderingContext2D
object has its lowLatency flag set to true, then the user agent will
- attempt to optimize the rendering of the canvas to reduce latency, including potentially rendering
- from the front buffer. This might desynchronize the canvas's display from the rest of the page and
- induce tearing on some displays.
+ data-x="concept-canvas-lowLatency">lowLatency flag set to true, then the user agent might
+ optimize the rendering of the canvas to reduce latency, including potentially rendering from the
+ front buffer . This might desynchronize presentation of
+ the canvas from the rest of the page, and induce tearing on some displays.
- The lowLatency
setting is useful
+
The lowLatency setting is useful and necessary when implementing certain kinds of applications, such as drawing applications, where the delay between input and rasterization is critical.
@@ -121793,6 +121793,9 @@ INSERT INTERFACES HEREIf the lowLatency
setting is provided and set to true, then the user agent might optimize the rendering of the
- canvas to reduce latency, including potentially rendering from the front buffer
- . This might desynchronize presentation of the canvas from the rest
- of the page, and induce tearing on some displays.
CanvasRenderingContext2D
object has its lowLatency flag set to true, then the user agent might
+ data-x="concept-canvas-lowLatency">lowLatency flag set to true, then the user agent should
optimize the rendering of the canvas to reduce latency, including potentially rendering from the
- front buffer . This might desynchronize presentation of
- the canvas from the rest of the page, and induce tearing on some displays.
+ front buffer. This might desynchronize presentation of the canvas from the rest of
+ the page, and induce tearing on some displays.
The lowLatency setting is useful and necessary when implementing certain kinds of applications, such as drawing applications, where @@ -121794,7 +121794,7 @@ INSERT INTERFACES HERE
getContext
('2d' [, { [ alpha
: false ] [, lowLatency
: true ] } ] )getContext
('2d' [, { [ alpha
: false ] [, desynchronized
: false ] } ] )If the alpha
setting is
provided and set to false, then the canvas is forced to always be opaque.
If the lowLatency
- setting is provided and set to true, then the user agent might optimize the rendering of the
- canvas to reduce latency, including potentially rendering from the front buffer.
- This might desynchronize presentation of the canvas from the rest of the page, and induce
- tearing on some displays.
If the desynchronized
+ setting is provided and set to true, then canvas can be
+ desynchronized
.
canvas
The CanvasRenderingContext2D
object also has a lowLatency flag, which can be set to true or false.
- Initially, when the context is created, its lowLatency flag must be set to false. When a
+ data-x="concept-canvas-desynchronized">desynchronized flag, which can be set to true or
+ false. Initially, when the context is created, its desynchronized flag must be set to false. When a
CanvasRenderingContext2D
object has its lowLatency flag set to true, then the user agent should
- optimize the rendering of the canvas to reduce latency, including potentially rendering from the
- front buffer. This might desynchronize presentation of the canvas from the rest of
- the page, and induce tearing on some displays.
The user agent/OS usually renders on a buffer which is not being displayed, + quickly swapping it and the one being scanned out for presentation; the former buffer is + called back-buffer and the latter front buffer (see ). + A popular technique for reducing latency is called front buffer rendering, + where rendering happens in parallel and racily with the scanning out process. This technique + reduces the latency at the price of potentially introducing tearing artifacts and can be + used to implement in total or part the desynchronized attribute.
-The lowLatency setting is useful - and necessary when implementing certain kinds of applications, such as drawing applications, where - the delay between input and rasterization is critical.
+The desynchronized + setting is useful and necessary when implementing certain kinds of applications, such + as drawing applications, where the latency between input and rasterization is critical.
The getContextAttributes()
method,
@@ -60409,9 +60419,9 @@ interface Path2D {
alpha
, set to true if this context's alpha flag is set, and false otherwise.
lowLatency
, set to true if this context's
- lowLatency flag is set, and false
- otherwise.
desynchronized
, set to true if this
+ context's desynchronized flag is set, and
+ false otherwise.
lowLatency
CanvasRenderingContext2D
object has its desynchronized flag set to true, then the user
- agent should optimize the rendering of the canvas to reduce the latency, as measured from input
- events to rasterization, by either decoupling the input event processing from the normal
- event processing cycle, bypassing the ordinary user agent/OS rendering algorithm, or both.
- Insofar as this mode involves bypassing the usual processing mechanisms of events or
- rasterization or both, it might introduce visible tearing artifacts.
-
+ agent should optimize the rendering of the canvas to reduce the latency, as measured from
+ input events to rasterization, by either desynchronizing the canvas paint cycle from the normal
+ DOM cycle, bypassing the ordinary user agent/OS rendering algorithm, or both. Insofar as this
+ mode involves bypassing the usual processing mechanisms of events or rasterization or both, it
+ might introduce visible tearing artifacts.
The user agent/OS usually renders on a buffer which is not being displayed, quickly swapping it and the one being scanned out for presentation; the former buffer is called back-buffer and the latter front buffer (see ). - A popular technique for reducing latency is called front buffer rendering, - where rendering happens in parallel and racily with the scanning out process. This technique - reduces the latency at the price of potentially introducing tearing artifacts and can be - used to implement in total or part the front buffer rendering, also + known as single buffer rendering, where rendering happens in parallel and racily + with the scanning out process. This technique reduces the latency at the price of potentially + introducing tearing artifacts and can be used to implement in total or part the desynchronized attribute.
The desynchronized
From f66a50b91a3081330e589bcf16f625252e142e99 Mon Sep 17 00:00:00 2001
From: Miguel Casas
The user agent/OS usually renders on a buffer which is not being displayed,
From f7e7e8ae5c64c0febd45e1d198c87dcbbbee558c Mon Sep 17 00:00:00 2001
From: Miguel Casas The CanvasRenderingContext2D
object also has a desynchronized flag, which can be set to true or
- false. Initially, when the context is created, its desynchronized flag must be set to false. When a
- CanvasRenderingContext2D
object has its desynchronized flag set to true, then the user
+ false. When an CanvasRenderingContext2D
object's desynchronized flag is true, then the user
agent should optimize the rendering of the canvas to reduce the latency, as measured from
- input events to rasterization, by either desynchronizing the canvas paint cycle from the normal
- DOM cycle, bypassing the ordinary user agent/OS rendering algorithm, or both. Insofar as this
- mode involves bypassing the usual paint mechanisms or rasterization or both, it
- might introduce visible tearing artifacts.
The user agent/OS usually renders on a buffer which is not being displayed,
quickly swapping it and the one being scanned out for presentation; the former buffer is
From 353153a2fd755373a8e4a0900114fd15cbe34d7d Mon Sep 17 00:00:00 2001
From: Anne van Kesteren
getContext
('2d' [, { [ alpha
: false ] [, desynchronized
: false ] } ] )getContext
('2d' [, { [ alpha
: true ] [, desynchronized
: false ] } ] )Returns a CanvasRenderingContext2D
object that is permanently bound to a
particular canvas
element.
If the alpha
setting is
- provided and set to false, then the canvas is forced to always be opaque.
If the alpha
member is
+ false, then the context is forced to always be opaque.
If the desynchronized
- setting is provided and set to true, then canvas can be
- desynchronized
.
canvas
Returns the canvas
element.
getContextAttributes
()Returns an object whose:
-Returns an object whose alpha
member is true if
- the context has an alpha channel, or false if it was forced to be opaque.
alpha
member is true if the context has an alpha
+ channel, or false if it was forced to be opaque.desynchronized
+ member is true if the context can be desynchronized.The CanvasRenderingContext2D
object also has an alpha flag, which can be set to true or false. Initially,
- when the context is created, its alpha flag must be
- set to true. When a CanvasRenderingContext2D
object has its alpha flag set to false, then its alpha channel must be
- fixed to 1.0 (fully opaque) for all pixels, and attempts to change the alpha component of any
- pixel must be silently ignored.
CanvasRenderingContext2D
object's alpha is false, then its alpha channel must be fixed to 1.0
+ (fully opaque) for all pixels, and attempts to change the alpha component of any pixel must be
+ silently ignored.
Thus, the bitmap of such a context starts off as opaque black instead
of transparent black; clearRect()
@@ -60381,31 +60378,30 @@ interface Path2D {
fourth byte in its input, and so on. However, the alpha component of styles and images drawn
onto the canvas are still honoured up to the point where they would impact the output
bitmap's alpha channel; for instance, drawing a 50% transparent white square on a freshly
- created output bitmap with its alpha
- flag set to false will result in a fully-opaque gray square.
The CanvasRenderingContext2D
object also has a desynchronized flag, which can be set to true or
- false. When an CanvasRenderingContext2D
object's desynchronized flag is true, then the user
- agent should optimize the rendering of the canvas to reduce the latency, as measured from
- input events to rasterization, by either desynchronizing the canvas paint cycle from the
- normal DOM cycle, bypassing the ordinary user agent/OS rendering algorithm, or both.
- Insofar as this mode involves bypassing the usual paint mechanisms or rasterization or both,
- it might introduce visible tearing artifacts.
The user agent/OS usually renders on a buffer which is not being displayed, - quickly swapping it and the one being scanned out for presentation; the former buffer is - called back-buffer and the latter front buffer (see ). - A popular technique for reducing latency is called front buffer rendering, also - known as single buffer rendering, where rendering happens in parallel and racily - with the scanning out process. This technique reduces the latency at the price of potentially - introducing tearing artifacts and can be used to implement in total or part the desynchronized attribute.
- -The desynchronized - setting is useful and necessary when implementing certain kinds of applications, such - as drawing applications, where the latency between input and rasterization is critical.
+ data-x="concept-canvas-desynchronized">desynchronized boolean. When a +CanvasRenderingContext2D
object's desynchronized is true, then the user agent should
+ optimize the rendering of the canvas to reduce the latency, as measured from input events to
+ rasterization, by desynchronizing the canvas paint cycle from the normal DOM cycle, bypassing the
+ ordinary user agent rendering algorithm, or both. Insofar as this mode involves bypassing the
+ usual paint mechanisms, rasterization, or both, it might introduce visible tearing artifacts.
+
+ The user agent usually renders on a buffer which is not being displayed, quickly + swapping it and the one being scanned out for presentation; the former buffer is called + back buffer and the latter front buffer. A popular technique for reducing latency is called + front buffer rendering, also known as single buffer rendering, where rendering happens in + parallel and racily with the scanning out process. This technique reduces the latency at the price + of potentially introducing tearing artifacts and can be used to implement in total or part of the + desynchronized boolean.
+ +The desynchronized boolean is + useful and necessary when implementing certain kinds of applications, such as drawing + applications, where the latency between input and rasterization is critical.
The getContextAttributes()
method,
@@ -60413,12 +60409,11 @@ interface Path2D {
the following members:
alpha
, set to true if this context's alpha flag is set, and false otherwise.
alpha
, set to this context's alpha.
desynchronized
, set to true if this
- context's desynchronized flag is set, and
- false otherwise.
desynchronized
, set to this context's
+ desynchronized.
height
content attributes.
- Process each of the members of settings as follows:
+Set context's alpha to
+ settings's alpha
.
alpha
desynchronized
Set context's desynchronized to settings's desynchronized
.
Return context.
If the desynchronized
member is
- true, then the context can be desynchronized.
The CanvasRenderingContext2D
object also has a desynchronized boolean. When a
CanvasRenderingContext2D
object's desynchronized is true, then the user agent should
+ data-x="concept-canvas-desynchronized">desynchronized is true, then the user agent may
optimize the rendering of the canvas to reduce the latency, as measured from input events to
rasterization, by desynchronizing the canvas paint cycle from the normal DOM cycle, bypassing the
ordinary user agent rendering algorithm, or both. Insofar as this mode involves bypassing the
@@ -60399,9 +60399,9 @@ interface Path2D {
desynchronized boolean.
The desynchronized boolean is - useful and necessary when implementing certain kinds of applications, such as drawing - applications, where the latency between input and rasterization is critical.
+The desynchronized boolean + can be useful when implementing certain kinds of applications, such as drawing applications, + where the latency between input and rasterization is critical.
The If the getContextAttributes()
method,
From bbd950b670bb3454fb41db4d97d1a7bbbce0d19d Mon Sep 17 00:00:00 2001
From: Miguel Casas desynchronized
member is
- true, then the context may be desynchronized.CanvasRenderingContext2D
object's desynchronized is true, then the user agent may
optimize the rendering of the canvas to reduce the latency, as measured from input events to
- rasterization, by desynchronizing the canvas paint cycle from the normal DOM cycle, bypassing the
+ rasterization, by desynchronizing the canvas paint cycle from the event loop, bypassing the
ordinary user agent rendering algorithm, or both. Insofar as this mode involves bypassing the
usual paint mechanisms, rasterization, or both, it might introduce visible tearing artifacts.