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

Unified Diff: third_party/WebKit/LayoutTests/svg/canvas/canvas-default-object-sizing-expected.html

Issue 2447013005: Revert of Turn on Analytic AA in Chrome (Closed)
Patch Set: Created 4 years, 2 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/LayoutTests/svg/canvas/canvas-default-object-sizing-expected.html
diff --git a/third_party/WebKit/LayoutTests/svg/canvas/canvas-default-object-sizing-expected.html b/third_party/WebKit/LayoutTests/svg/canvas/canvas-default-object-sizing-expected.html
new file mode 100644
index 0000000000000000000000000000000000000000..6a84c91ca0e63b3b0299055ed1952344e5f92c18
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/svg/canvas/canvas-default-object-sizing-expected.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<title>Sizing SVG image when drawn to canvas</title>
+<script>
+function createCanvas(drawFunc)
+{
+ var canvas = document.createElement('canvas');
+ canvas.width = 100;
+ canvas.height = 100;
+ document.documentElement.appendChild(canvas);
+
+ drawFunc(canvas.getContext('2d'));
+}
+
+function drawCircle(ctx, x, y, r, sx, sy)
+{
+ ctx.fillStyle = "blue";
+
+ ctx.scale(sx || 1, sy || 1);
+ ctx.beginPath();
+ ctx.arc(x, y, r, 0, 2*Math.PI);
+ ctx.fill();
+}
+
+createCanvas(function (ctx) { drawCircle(ctx, 50, 50, 50); });
+createCanvas(function (ctx) { drawCircle(ctx, 50, 25, 25); });
+createCanvas(function (ctx) { drawCircle(ctx, 25, 50, 25); });
+createCanvas(function (ctx) { drawCircle(ctx, 50, 25, 25, 1, 2); });
+createCanvas(function (ctx) { drawCircle(ctx, 25, 50, 25, 2, 1); });
+createCanvas(function (ctx) { drawCircle(ctx, 25, 50, 25); });
+createCanvas(function (ctx) { drawCircle(ctx, 50, 25, 25); });
+createCanvas(function (ctx) { drawCircle(ctx, 50, 25, 25); });
+createCanvas(function (ctx) { drawCircle(ctx, 50, 50, 50); });
+createCanvas(function (ctx) { drawCircle(ctx, 50, 50, 50); });
+createCanvas(function (ctx) { drawCircle(ctx, 50, 25, 25); drawCircle(ctx, 50, 75, 25); });
+createCanvas(function (ctx) { drawCircle(ctx, 50, 50, 50); });
+
+</script>

Powered by Google App Engine
This is Rietveld 408576698