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

Unified Diff: third_party/WebKit/Source/core/layout/compositing/CompositingRequirementsUpdater.cpp

Issue 2714283002: Fix unexpected blurry text caused by combination of skew and promotion (Closed)
Patch Set: 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/Source/core/layout/compositing/CompositingRequirementsUpdater.cpp
diff --git a/third_party/WebKit/Source/core/layout/compositing/CompositingRequirementsUpdater.cpp b/third_party/WebKit/Source/core/layout/compositing/CompositingRequirementsUpdater.cpp
index aca28342b55b0d8d63095c2406bf06611a14e85a..e19adfdd0383471053601b798bd1c092cea06843 100644
--- a/third_party/WebKit/Source/core/layout/compositing/CompositingRequirementsUpdater.cpp
+++ b/third_party/WebKit/Source/core/layout/compositing/CompositingRequirementsUpdater.cpp
@@ -539,6 +539,24 @@ void CompositingRequirementsUpdater::updateRecursive(
anyDescendantHas3DTransform || layer->has3DTransform();
}
+ // Promote skewed elements within a promoted skewed element to improve
+ // output quality.
+ if (canBeComposited && ancestorLayer &&
+ ancestorLayer->getCompositingReasons()) {
flackr 2017/02/25 15:16:19 Only if the ancestor was also skewed. If the ances
yigu 2017/02/27 22:03:41 Done.
+ if (layer->layoutObject().styleRef().hasTransform()) {
+ for (const auto& operation :
+ layer->layoutObject().styleRef().transform().operations()) {
flackr 2017/02/25 15:16:19 Move this to TransformOperations::hasSkew.
yigu 2017/02/27 22:03:42 Done.
+ TransformOperation::OperationType type = operation->type();
+ if (type == TransformOperation::Skew ||
+ type == TransformOperation::SkewX ||
+ type == TransformOperation::SkewY) {
+ reasonsToComposite |=
+ CompositingReasonLayerForTextWithinSkewedPromotedElement;
+ }
+ }
+ }
+ }
+
// At this point we have finished collecting all reasons to composite this
// layer.
layer->setCompositingReasons(reasonsToComposite);

Powered by Google App Engine
This is Rietveld 408576698