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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/canvas/canvas-imageSmoothingQuality.html

Issue 1511113004: Remove SK_SUPPORT_LEGACY_HQ_DOWNSAMPLING (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: browser_tests rebaseline Created 4 years, 10 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
« no previous file with comments | « third_party/WebKit/LayoutTests/css3/masking/mask-repeat-round-content-expected.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <body> 3 <body>
4 <script src="../../resources/js-test.js"></script> 4 <script src="../../resources/js-test.js"></script>
5 <canvas id="source"></canvas> 5 <canvas id="source"></canvas>
6 <canvas id="default"></canvas> 6 <canvas id="default"></canvas>
7 <script> 7 <script>
8 8
9 description("Tests for the imageSmoothingQuality attribute."); 9 description("Tests for the imageSmoothingQuality attribute.");
10 10
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 var highData = scaleTestResults("high"); 73 var highData = scaleTestResults("high");
74 var highContext = document.getElementById("highCanvas").getContext('2d'); 74 var highContext = document.getElementById("highCanvas").getContext('2d');
75 var highCanvas = document.getElementById("highCanvas"); 75 var highCanvas = document.getElementById("highCanvas");
76 shouldBe("highContext.imageSmoothingQuality", "'high'"); 76 shouldBe("highContext.imageSmoothingQuality", "'high'");
77 77
78 lowContext.imageSmoothingEnabled = false; 78 lowContext.imageSmoothingEnabled = false;
79 var noFilterData = scaleImageData(lowCanvas, lowCanvas.imageSmoothingQuality); 79 var noFilterData = scaleImageData(lowCanvas, lowCanvas.imageSmoothingQuality);
80 80
81 debug(""); 81 debug("");
82 shouldNotBe("lowData", "mediumData"); 82 shouldNotBe("lowData", "mediumData");
83 shouldNotBe("mediumData", "highData"); 83 // Skia uses mipmaps when downscaling, for both high and medium quality
84 shouldBe("mediumData", "highData");
84 shouldNotBe("lowData", "highData"); 85 shouldNotBe("lowData", "highData");
85 86
86 debug(""); 87 debug("");
87 shouldBeGreaterThan("sampleAlpha(noFilterData)", "sampleAlpha(lowData)"); 88 shouldBeGreaterThan("sampleAlpha(noFilterData)", "sampleAlpha(lowData)");
88 shouldBeGreaterThan("sampleAlpha(lowData)", "sampleAlpha(mediumData)"); 89 shouldBeGreaterThan("sampleAlpha(lowData)", "sampleAlpha(mediumData)");
89 shouldBeGreaterThan("sampleAlpha(mediumData)", "sampleAlpha(highData)"); 90 // Skia uses mipmaps when downscaling, for both high and medium quality
91 shouldBe("sampleAlpha(mediumData)", "sampleAlpha(highData)");
90 92
91 93
92 debug("\n\nOn setting, it must be set to the new value."); 94 debug("\n\nOn setting, it must be set to the new value.");
93 evalAndLog("highContext.imageSmoothingQuality = 'medium';"); 95 evalAndLog("highContext.imageSmoothingQuality = 'medium';");
94 shouldBe("highContext.imageSmoothingQuality", "'medium'"); 96 shouldBe("highContext.imageSmoothingQuality", "'medium'");
95 shouldBe("scaleImageData(highCanvas, highCanvas.imageSmoothingQuality);", 97 shouldBe("scaleImageData(highCanvas, highCanvas.imageSmoothingQuality);",
96 "mediumData"); 98 "mediumData");
97 evalAndLog("highContext.imageSmoothingQuality = 'high';"); 99 evalAndLog("highContext.imageSmoothingQuality = 'high';");
98 shouldBe("highContext.imageSmoothingQuality", "'high'"); 100 shouldBe("highContext.imageSmoothingQuality", "'high'");
99 shouldBe("scaleImageData(highCanvas, highCanvas.imageSmoothingQuality);", 101 shouldBe("scaleImageData(highCanvas, highCanvas.imageSmoothingQuality);",
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 shouldBe("scaleImageData(highCanvas, highCanvas.imageSmoothingQuality);", 135 shouldBe("scaleImageData(highCanvas, highCanvas.imageSmoothingQuality);",
134 "mediumData"); 136 "mediumData");
135 shouldBe("highContext.restore(); highContext.imageSmoothingQuality", "'high'"); 137 shouldBe("highContext.restore(); highContext.imageSmoothingQuality", "'high'");
136 shouldBe("scaleImageData(highCanvas, highCanvas.imageSmoothingQuality);", 138 shouldBe("scaleImageData(highCanvas, highCanvas.imageSmoothingQuality);",
137 "highData"); 139 "highData");
138 140
139 debug(""); 141 debug("");
140 </script> 142 </script>
141 </body> 143 </body>
142 </html> 144 </html>
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/css3/masking/mask-repeat-round-content-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698