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

Unified Diff: third_party/WebKit/LayoutTests/compositing/text-within-skewed-promoted-element.html

Issue 2714283002: Fix unexpected blurry text caused by combination of skew and promotion (Closed)
Patch Set: Refactor && add unit tests Created 3 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/compositing/text-within-skewed-promoted-element.html
diff --git a/third_party/WebKit/LayoutTests/compositing/text-within-skewed-promoted-element.html b/third_party/WebKit/LayoutTests/compositing/text-within-skewed-promoted-element.html
new file mode 100644
index 0000000000000000000000000000000000000000..8d2dd14c7a3565ee570739268aee03f4784e1ba7
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/compositing/text-within-skewed-promoted-element.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+
+<!--
+Check that we separately composite text within a skewed promoted element
+to improve the output quality. See crbug.com/631872.
+-->
+<style>
+div.outer {
+ transform: skew(20deg);
+ border: 1px solid black;
+ padding: 0 20px 0 20px;
+}
+
+div.outer > div {
+ transform: skew(-20deg);
+}
+
+div.layer {
+ will-change: transform;
+}
+</style>
+
+<script type="text/javascript">
+ function doTest() {
+ if (window.testRunner) {
+ window.testRunner.dumpAsTextWithPixelResults();
+ }
+ }
+ window.addEventListener('load', doTest);
+</script>
+
+<div class="outer">
+ <div>Text which is not promoted to a layer is drawn crips with subpixel
+ anti-aliasing.</div>
+</div>
+
+<div class="outer layer">
+ <div>Text which is part of a skewed layer is skewed after it's rastered
+ (with the counter-skew) resulting in extremely blurry text.
+ But if that text is separately composited, then it's rastered into a
+ rectilinear layer so it looks crisp (but doesn't get subpixel
+ antialiasing because it's promoted)
+ </div>
+</div>

Powered by Google App Engine
This is Rietveld 408576698