| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| |
| Check for drawing webgl to canvas 2d on the same frame. |
| 1) when drawingBuffer is preserved. |
| PASS imgdata[0] is 255 |
| PASS imgdata[1] is 0 |
| PASS imgdata[2] is 0 |
| PASS imgdata[0] is 0 |
| PASS imgdata[1] is 255 |
| PASS imgdata[2] is 0 |
| 2) when drawingBuffer is not preserved. |
| PASS imgdata[0] is 255 |
| PASS imgdata[1] is 0 |
| PASS imgdata[2] is 0 |
| PASS imgdata[0] is 0 |
| PASS imgdata[1] is 255 |
| PASS imgdata[2] is 0 |
| Check for drawing webgl to canvas 2d several frames after drawing webgl contents. |
| 1) when drawingBuffer is preserved. |
| PASS imgdata[0] is 255 |
| PASS imgdata[1] is 0 |
| PASS imgdata[2] is 0 |
| PASS imgdata[0] is 0 |
| PASS imgdata[1] is 255 |
| PASS imgdata[2] is 0 |
| 2) when drawingBuffer is not preserved. It leads to undefined behavior. |
| PASS imgdata[0] is 255 |
| PASS imgdata[1] is 0 |
| PASS imgdata[2] is 0 |
| PASS imgdata[0] is 255 |
| PASS imgdata[1] is 0 |
| PASS imgdata[2] is 0 |
| Everything is same to draw-webgl-to-canvas-2d.html except for calling redundant toDataURL(). Canvas spec allows to call toDataURL() without a context. Some bad things can happen if we call toDataURL() without a context and then create a context and then call toDataURL() again. |