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

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

Issue 2683343002: Notify listeners on bitmaprenderer context changes (Closed)
Patch Set: Change didDraw() call. 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 d93dd9ceb956fbae1b63ea48fcef42550802366f..59f33f906d53b9cc885b248a94134f3979f7116e 100644
--- a/content/test/data/media/canvas_capture.html
+++ b/content/test/data/media/canvas_capture.html
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
-<title>Media Capture from Canvas ElementsBrowser Test</title>
+<title>Media Capture from Canvas Browser Test</title>
</head>
<body>
<div> Capture and playback from canvas elements.</div>
@@ -41,6 +41,16 @@ function drawOffscreenCanvasCommit(canvas, drawCounter) {
checkForRedraw(canvas, drawCounter, drawOffscreenCanvasCommit);
};
+function drawBitmapRenderer(canvas, drawCounter) {
+ var gl = canvas.getContext('bitmaprenderer');
+ var offscreen = new OffscreenCanvas(64, 48);
+ 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');
canvas.width = canvas.height = 64;

Powered by Google App Engine
This is Rietveld 408576698