New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 605366 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Last visit > 30 days ago
Closed: May 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

On canvas2D, context.drawImage fails when source video is of unusual geometry

Reported by cpaulin@chromium.org, Apr 21 2016

Issue description

Version: ToT chrome linux

My setup is like this:
1) draw a 17x17 canvas in solid color
2) capture this canvas using canvas.CaptureStream()
3) play the captured stream in a video tag
4) snapshot that video tag in a new canvas (snapshotCanvas)

My observation is that on step 4, the snapshotCanvas does not get drawn correctly if the geometry of video is unusual (like 5x5 or 17x17)


I have attached a simple javascript that tries these steps above, using clearRect() to clear canvas prior to drawing in one case and in the other case using context.save()/restore() to clear canvas before a second drawImqae() call.

See attached zoomed screen capture.
 


 
drawbug.png
70.8 KB View Download
clearRectBug.html
2.3 KB View Download
Here is a short video showing the problem with ToT build 52.0.2716.0
test (1).webm
506 KB Download
The problem is that the snapshotCanvas (3rd one on the right) is not drawn identically to the other two on the left, it is missing some bottom rows of pixels.

Comment 3 by junov@chromium.org, Apr 25 2016

Owner: emir...@chromium.org
Status: Assigned (was: Untriaged)
junov@, I think this issue is more than the scope of canvas capture.

Canvas capture produces the output as a MediaStream and it is played in a <video> tag. In the example you can see that playing that MediaStream in a <video> tag that is 17x17 is fine -square in the middle-. That indicates canvas capture is producing the correct output. The problem arises when that 17x17 video is drawn on a 17x17 canvas via drawImage(video, 0, 0) -square on the right-. At that point, the bottom right corner seems to be cut, indicating a padding problems. 

AFAIU, you can cut the canvas capture part and reproduce the problem with just playing a 17x17 video. WDYT?

Comment 5 by junov@chromium.org, Apr 27 2016

Owner: junov@chromium.org
Alright, I will look into this a bit more.
I can no longer see the problem on today's linux ToT
Status: Fixed (was: Assigned)
cool, mark as fixed.

Comment 8 by junov@chromium.org, May 20 2016

Status: WontFix (was: Fixed)
Actually, when a bug does not repro, we mark it as WontFix.

Sign in to add a comment