Chromium Code Reviews| 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); |