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

Unified Diff: LayoutTests/fast/canvas/pixelated-off-screen-expected.html

Issue 562583002: Implement image-rendering:pixelated for accelerated 2D canvases. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Don't call setImageInterpolationQuality Created 6 years 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 | « LayoutTests/fast/canvas/pixelated-off-screen.html ('k') | LayoutTests/fast/canvas/pixelated-resize.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/canvas/pixelated-off-screen-expected.html
diff --git a/LayoutTests/css3/images/pixelated-canvas.html b/LayoutTests/fast/canvas/pixelated-off-screen-expected.html
similarity index 77%
copy from LayoutTests/css3/images/pixelated-canvas.html
copy to LayoutTests/fast/canvas/pixelated-off-screen-expected.html
index 6caa2b9d99d83bdd1c90336d5eac6292286bf685..963c9b472beef3ff35d8d2bd18b5c6fde85f315e 100644
--- a/LayoutTests/css3/images/pixelated-canvas.html
+++ b/LayoutTests/fast/canvas/pixelated-off-screen-expected.html
@@ -7,6 +7,7 @@
}
</style>
<body>
+ <!-- Draw to a canvas already in the DOM. -->
<!-- The resulting image should be 100x100, consisting of 4 50x50 blocks of solid color, with no blurring of edges -->
<canvas width="2" height="2"></canvas>
</body>
@@ -15,15 +16,11 @@
if (window.testRunner)
window.testRunner.dumpAsTextWithPixelResults();
- var canvas;
- var imageHandle;
- canvas = document.getElementsByTagName("canvas")[0].getContext("2d");
- canvas.width = 2;
- canvas.height = 2;
- imageHandle = canvas.createImageData(2, 2);
+ var canvas = document.getElementsByTagName("canvas")[0];
+ var context = canvas.getContext("2d");
+ var imageHandle = context.createImageData(canvas.width, canvas.height);
var index = 0;
- var length = imageHandle.data.length;
imageHandle.data[index++] = 255;
imageHandle.data[index++] = 0;
@@ -45,5 +42,5 @@
imageHandle.data[index++] = 0;
imageHandle.data[index++] = 255;
- canvas.putImageData(imageHandle, 0, 0);
-</script>
+ context.putImageData(imageHandle, 0, 0);
+</script>
« no previous file with comments | « LayoutTests/fast/canvas/pixelated-off-screen.html ('k') | LayoutTests/fast/canvas/pixelated-resize.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698