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

Unified Diff: third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-fillRect-in-worker.html

Issue 1844083002: Color parsing in CSSParser: avoid using ColorValueCache on worker thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 9 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-fillRect-in-worker-expected.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-fillRect-in-worker.html
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-fillRect-in-worker.html b/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-fillRect-in-worker.html
index a50b76594053d3e900fd029612d0e273d33b3e8c..3fb094628bf34d5d85f78a6b679702abde6f6692 100644
--- a/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-fillRect-in-worker.html
+++ b/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-fillRect-in-worker.html
@@ -1,16 +1,30 @@
<!DOCTYPE html>
<html>
<body>
-<canvas id='output' width='100' height='100' style='background:red'></canvas>
-
+<canvas id='output1' width='100' height='100' style='background:red'></canvas>
+<canvas id='output2' width='100' height='100' style='background:red'></canvas>
+<canvas id='output3' width='100' height='100' style='background:red'></canvas>
<script id='myWorker' type='text/worker'>
self.onmessage = function(e) {
var aCanvas = new OffscreenCanvas(100, 100);
var ctx = aCanvas.getContext('2d');
ctx.fillStyle = 'green';
ctx.fillRect(0, 0, 100, 100);
- var image = aCanvas.transferToImageBitmap();
- self.postMessage(image, [image]);
+ var image1 = aCanvas.transferToImageBitmap();
+
+ ctx.fillStyle = '#D359FE';
+ ctx.fillRect(0, 0, 100, 100);
+ var image2 = aCanvas.transferToImageBitmap();
+
+ ctx.fillStyle = 'rgb(150,250,100)';
+ ctx.fillRect(0, 0, 100, 100);
+ var image3 = aCanvas.transferToImageBitmap();
+
+ self.postMessage(
+ { i1: image1,
+ i2: image2,
+ i3: image3 },
+ [ image1, image2, image3 ]);
};
</script>
@@ -21,8 +35,13 @@ if (window.testRunner) {
var blob = new Blob([document.getElementById('myWorker').textContent]);
var worker = new Worker(URL.createObjectURL(blob));
worker.addEventListener('message', msg => {
- var outputCtx = document.getElementById('output').getContext('bitmaprenderer');
- outputCtx.transferImageBitmap(msg.data);
+ var outputCtx1 = document.getElementById('output1').getContext('bitmaprenderer');
+ outputCtx1.transferImageBitmap(msg.data.i1);
+ var outputCtx2 = document.getElementById('output2').getContext('bitmaprenderer');
+ outputCtx2.transferImageBitmap(msg.data.i2);
+ var outputCtx3 = document.getElementById('output3').getContext('bitmaprenderer');
+ outputCtx3.transferImageBitmap(msg.data.i3);
+
if (window.testRunner) {
testRunner.notifyDone();
}
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-fillRect-in-worker-expected.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698