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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <script src="../resources/runner.js"></script>
5 <script src="resources/canvas_runner.js"></script>
6 <script>
7 var source = new OffscreenCanvas(2000, 1000);
8 var ctx = source.getContext("2d");
9 var destination = document.createElement('canvas');
10 var destinationCtx = destination.getContext('bitmaprenderer')
11
12 window.onload = function () {
13 CanvasRunner.start({
14 description: "This bench test checks the speed of tranferring 2D context con tent to a 'bitmaprenderer' context.",
15 doRun: doRun
16 });
17 }
18
19 function doRun() {
20 ctx.fillRect(0, 0, 1, 1);
21 var img = source.transferToImageBitmap();
22 destinationCtx.transferFromImageBitmap(img);
23 }
24 </script>
25 </body>
26 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698