This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 19015 - Enhancement: Set only single component for each pixel
Summary: Enhancement: Set only single component for each pixel
Status: RESOLVED LATER
Alias: None
Product: HTML WG
Classification: Unclassified
Component: HTML5 spec (show other bugs)
Version: unspecified
Hardware: All All
: P5 enhancement
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords: a11y, a11y_canvas
Depends on:
Blocks:
 
Reported: 2012-09-25 21:53 UTC by contributor
Modified: 2012-09-25 22:26 UTC (History)
6 users (show)

See Also:


Attachments

Description contributor 2012-09-25 21:53:23 UTC
This was was cloned from bug 13096 as part of operation LATER convergence.
Originally filed: 2011-06-30 11:03:00 +0000
Original reporter: j.chetwynd <j.chetwynd@btinternet.com>

================================================================================
 #0   j.chetwynd                                      2011-06-30 11:03:46 +0000 
--------------------------------------------------------------------------------
bug 13085 allows for a single component such as alpha to be set for a whole image,
this related bug proposes that each component can be independently set.

in data visualisations, where the canvas is large and most pixels need to be changed at high refresh rates, component arrays can be large to sort, and set. Allowing a single components to be set per pixel may provide considerable advantage. see peepo.com for demonstration.

there are also significant advantages to colour separation, when presenting data.

and furthermore, there are accessibility implications for people not requiring full colour images, and those using mobile phones, or slower processors.
================================================================================
 #2   Ian 'Hixie' Hickson                             2011-12-01 23:47:22 +0000 
--------------------------------------------------------------------------------
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Accepted
Change Description: no spec change
Rationale: You can do this already using putImageData() and a dirty region.
================================================================================
 #3   j.chetwynd                                      2011-12-02 08:32:57 +0000 
--------------------------------------------------------------------------------
#2 perhaps "Set single component for pixel" and  "each component can be independently set." are not clear?

as I understand it putImageData() requires alpha and RGB color to be set for each pixel.

this bug proposes that a single component such as alpha might be set.
and thus not requiring the other three components to be set (again) at the same time.

the issue is that where only one of the four is being manipulated processing time could be accelerated, on large full screen images of many megabytes.

apologies if I misunderstand the situation.
================================================================================
 #4   Ian 'Hixie' Hickson                             2011-12-02 17:10:35 +0000 
--------------------------------------------------------------------------------
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Did Not Understand Request
Change Description: no spec change
Rationale: Do you have data showing that setting all four bytes of a pixel at a time is actually a performance problem? It seems highly unlikely to me that with modern architectures there would be any practical difference. If anything, setting one byte out of a 32bit word would seem to likely be more expensive that setting all 4 bytes. Certainly if you're manipulating more than one pixel at a time (which I assume in reality you would almost always be, since changing just one pixel every 20ms would be an imperceptibly slow change to an image) then it's quicker to just blit the entire image as one solid memory block than it is to try to just push over the channels that have changed.
================================================================================
 #5   j.chetwynd                                      2011-12-02 19:31:12 +0000 
--------------------------------------------------------------------------------
#4 Ian, 

this bug refers to changing one channel in the limit for every pixel in a large image say 1920x1080,

as I understand it there are ways of doing this in hardware,
but the current spec doesn't allow only a single channel to be updated.

please make your own research regarding hardware before closing again.
color separation is well known, studied and explored.
================================================================================
 #6   Ian 'Hixie' Hickson                             2011-12-02 20:58:16 +0000 
--------------------------------------------------------------------------------
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Partially Accepted
Change Description: none yet
Rationale: If your request is just to add a feature to manipulate a single channel in hardware, then I am marking this bug LATER for now, so that we can examine whether authors actually end up needing this enough to justify the new feature. I suspect that in practice getImageData/putImageData is plenty fast enough and would not be noticeably slower than a single-channel mechanism.
================================================================================
 #7   Ian 'Hixie' Hickson                             2012-02-29 00:10:32 +0000 
--------------------------------------------------------------------------------
(still need more data on this)
================================================================================