Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(361)

Unified Diff: content/test/data/media/canvas_capture.html

Issue 2683343002: Notify listeners on bitmaprenderer context changes (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/test/data/media/canvas_capture.html
diff --git a/content/test/data/media/canvas_capture.html b/content/test/data/media/canvas_capture.html
index 15a904264cd67b56b580adbe8d4a03ca7311dda7..1490c3da35b18ec4478ceadfe134084e66c7047d 100644
--- a/content/test/data/media/canvas_capture.html
+++ b/content/test/data/media/canvas_capture.html
@@ -33,6 +33,16 @@ function drawWebGL(canvas, drawCounter) {
checkForRedraw(canvas, drawCounter, drawWebGL);
};
+function drawBitmapRenderer(canvas, drawCounter) {
+ var gl = canvas.getContext('bitmaprenderer');
+ var offscreen = new OffscreenCanvas(400,200);
+ var ctx = offscreen.getContext('2d');
+ ctx.fillStyle = 'green';
+ ctx.fillRect(0, 0, canvas.width, canvas.height);
+ gl.transferFromImageBitmap(offscreen.transferToImageBitmap());
+ checkForRedraw(canvas, drawCounter, drawBitmapRenderer);
+};
+
function testCanvasCapture(drawFunction) {
var canvas = document.createElement('canvas');
document.body.appendChild(canvas);

Powered by Google App Engine
This is Rietveld 408576698