Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2014 Google Inc. All rights reserved. | 3 * Copyright (C) 2014 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 532 isCompositedWithInlineTransform) | 532 isCompositedWithInlineTransform) |
| 533 currentRecursionData.m_testingOverlap = false; | 533 currentRecursionData.m_testingOverlap = false; |
| 534 | 534 |
| 535 if (childRecursionData.m_compositingAncestor == layer) | 535 if (childRecursionData.m_compositingAncestor == layer) |
| 536 overlapMap.finishCurrentOverlapTestingContext(); | 536 overlapMap.finishCurrentOverlapTestingContext(); |
| 537 | 537 |
| 538 descendantHas3DTransform |= | 538 descendantHas3DTransform |= |
| 539 anyDescendantHas3DTransform || layer->has3DTransform(); | 539 anyDescendantHas3DTransform || layer->has3DTransform(); |
| 540 } | 540 } |
| 541 | 541 |
| 542 // Promote skewed elements within a promoted skewed element to improve | |
| 543 // output quality. | |
| 544 if (canBeComposited && ancestorLayer && | |
| 545 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.
| |
| 546 if (layer->layoutObject().styleRef().hasTransform()) { | |
| 547 for (const auto& operation : | |
| 548 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.
| |
| 549 TransformOperation::OperationType type = operation->type(); | |
| 550 if (type == TransformOperation::Skew || | |
| 551 type == TransformOperation::SkewX || | |
| 552 type == TransformOperation::SkewY) { | |
| 553 reasonsToComposite |= | |
| 554 CompositingReasonLayerForTextWithinSkewedPromotedElement; | |
| 555 } | |
| 556 } | |
| 557 } | |
| 558 } | |
| 559 | |
| 542 // At this point we have finished collecting all reasons to composite this | 560 // At this point we have finished collecting all reasons to composite this |
| 543 // layer. | 561 // layer. |
| 544 layer->setCompositingReasons(reasonsToComposite); | 562 layer->setCompositingReasons(reasonsToComposite); |
| 545 } | 563 } |
| 546 | 564 |
| 547 } // namespace blink | 565 } // namespace blink |
| OLD | NEW |