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

Unified Diff: third_party/WebKit/PerformanceTests/Canvas/transferFromImageBitmap.html

Issue 2738573002: Streamline the presentation of ImageBitmapRenderingContext (Closed)
Patch Set: Fixed expectations Created 3 years, 8 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: third_party/WebKit/PerformanceTests/Canvas/transferFromImageBitmap.html
diff --git a/third_party/WebKit/PerformanceTests/Canvas/transferFromImageBitmap.html b/third_party/WebKit/PerformanceTests/Canvas/transferFromImageBitmap.html
new file mode 100644
index 0000000000000000000000000000000000000000..d50fb83999feb23441c0e4bb3956a811951f3f58
--- /dev/null
+++ b/third_party/WebKit/PerformanceTests/Canvas/transferFromImageBitmap.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<body>
+<script src="../resources/runner.js"></script>
+<script src="resources/canvas_runner.js"></script>
+<script>
+var source = new OffscreenCanvas(2000, 1000);
+var ctx = source.getContext("2d");
+var destination = document.createElement('canvas');
+var destinationCtx = destination.getContext('bitmaprenderer')
+
+window.onload = function () {
+ CanvasRunner.start({
+ description: "This bench test checks the speed of tranferring 2D context content to a 'bitmaprenderer' context.",
+ doRun: doRun
+ });
+}
+
+function doRun() {
+ ctx.fillRect(0, 0, 1, 1);
+ var img = source.transferToImageBitmap();
+ destinationCtx.transferFromImageBitmap(img);
+}
+</script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698