[Webkit-unassigned] [Bug 218324] New: REGRESSION(269065): [GPU Process]: Order of drawing has to be preserved when drawing a canvas to another canvas
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Oct 28 23:12:53 PDT 2020
https://bugs.webkit.org/show_bug.cgi?id=218324
Bug ID: 218324
Summary: REGRESSION(269065): [GPU Process]: Order of drawing
has to be preserved when drawing a canvas to another
canvas
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: Canvas
Assignee: webkit-unassigned at lists.webkit.org
Reporter: sabouhallawa at apple.com
CC: dino at apple.com
When drawing an ImageBuffer to another ImageBuffer, the DrawingContext of the source and the destination ImageBuffers have to be flushed immediately. Otherwise an older version or a newer version of the source ImageBuffer might be drawn to the destination ImageBuffer. Consider this example and assume GPU rendering is enabled for canvas.
<script>
var canvas1 = document.getElementById('canvas1');
var canvas2 = document.getElementById('canvas2');
var canvas3 = document.getElementById('canvas3');
var ctx3 = canvas3.getContext('2d');
ctx3.fillStyle = 'red';
ctx3.fillRect(0, 0, 100, 100);
var ctx1 = canvas1.getContext('2d');
ctx1.drawImage(canvas3, 0, 0);
ctx3.fillStyle = 'green';
ctx3.fillRect(0, 0, 100, 100);
var ctx2 = canvas2.getContext('2d');
ctx2.drawImage(canvas3, 0, 0);
ctx3.fillStyle = 'blue';
ctx3.fillRect(0, 0, 100, 100);
</script>
1. If we do not flush any of the canvases after the "drawImage" calls, the first two canvases will not be drawn. This means an older version of canvas3 is drawn to canvas1 and canvas2.
2. If we flush canvas3 after the "drawImage" calls, all the canvases will be filled with blue. This means a newer version of canvas3 is drawn to canvas1 and canvas2.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20201029/895b80e3/attachment.htm>
More information about the webkit-unassigned
mailing list