| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 } | 498 } |
| 499 } else { | 499 } else { |
| 500 if (hasScrollingLayer()) | 500 if (hasScrollingLayer()) |
| 501 m_scrollingContentsLayer->setContentsOpaque(false); | 501 m_scrollingContentsLayer->setContentsOpaque(false); |
| 502 m_graphicsLayer->setContentsOpaque( | 502 m_graphicsLayer->setContentsOpaque( |
| 503 m_owningLayer.backgroundIsKnownToBeOpaqueInRect(compositedBounds())); | 503 m_owningLayer.backgroundIsKnownToBeOpaqueInRect(compositedBounds())); |
| 504 } | 504 } |
| 505 } | 505 } |
| 506 } | 506 } |
| 507 | 507 |
| 508 void CompositedLayerMapping::updateRasterizationPolicy() { |
| 509 bool allowTransformedRasterization = |
| 510 !requiresCompositing(m_owningLayer.getCompositingReasons() & |
| 511 ~CompositingReasonSquashingDisallowed); |
| 512 m_graphicsLayer->contentLayer()->setAllowTransformedRasterization( |
| 513 allowTransformedRasterization); |
| 514 if (m_squashingLayer) |
| 515 m_squashingLayer->contentLayer()->setAllowTransformedRasterization(true); |
| 516 } |
| 517 |
| 508 void CompositedLayerMapping::updateCompositedBounds() { | 518 void CompositedLayerMapping::updateCompositedBounds() { |
| 509 DCHECK_EQ(m_owningLayer.compositor()->lifecycle().state(), | 519 DCHECK_EQ(m_owningLayer.compositor()->lifecycle().state(), |
| 510 DocumentLifecycle::InCompositingUpdate); | 520 DocumentLifecycle::InCompositingUpdate); |
| 511 // FIXME: if this is really needed for performance, it would be better to | 521 // FIXME: if this is really needed for performance, it would be better to |
| 512 // store it on Layer. | 522 // store it on Layer. |
| 513 m_compositedBounds = m_owningLayer.boundingBoxForCompositing(); | 523 m_compositedBounds = m_owningLayer.boundingBoxForCompositing(); |
| 514 m_contentOffsetInCompositingLayerDirty = true; | 524 m_contentOffsetInCompositingLayerDirty = true; |
| 515 } | 525 } |
| 516 | 526 |
| 517 void CompositedLayerMapping::updateAfterPartResize() { | 527 void CompositedLayerMapping::updateAfterPartResize() { |
| (...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1112 m_owningLayer.getScrollableArea()->positionOverflowControls(); | 1122 m_owningLayer.getScrollableArea()->positionOverflowControls(); |
| 1113 | 1123 |
| 1114 updateLayerBlendMode(layoutObject().styleRef()); | 1124 updateLayerBlendMode(layoutObject().styleRef()); |
| 1115 updateIsRootForIsolatedGroup(); | 1125 updateIsRootForIsolatedGroup(); |
| 1116 updateContentsRect(); | 1126 updateContentsRect(); |
| 1117 updateBackgroundColor(); | 1127 updateBackgroundColor(); |
| 1118 updateDrawsContent(); | 1128 updateDrawsContent(); |
| 1119 updateElementIdAndCompositorMutableProperties(); | 1129 updateElementIdAndCompositorMutableProperties(); |
| 1120 updateBackgroundPaintsOntoScrollingContentsLayer(); | 1130 updateBackgroundPaintsOntoScrollingContentsLayer(); |
| 1121 updateContentsOpaque(); | 1131 updateContentsOpaque(); |
| 1132 updateRasterizationPolicy(); |
| 1122 updateAfterPartResize(); | 1133 updateAfterPartResize(); |
| 1123 updateRenderingContext(); | 1134 updateRenderingContext(); |
| 1124 updateShouldFlattenTransform(); | 1135 updateShouldFlattenTransform(); |
| 1125 updateChildrenTransform(); | 1136 updateChildrenTransform(); |
| 1126 updateScrollParent(scrollParent()); | 1137 updateScrollParent(scrollParent()); |
| 1127 registerScrollingLayers(); | 1138 registerScrollingLayers(); |
| 1128 | 1139 |
| 1129 updateCompositingReasons(); | 1140 updateCompositingReasons(); |
| 1130 } | 1141 } |
| 1131 | 1142 |
| (...skipping 2407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3539 } else if (graphicsLayer == m_decorationOutlineLayer.get()) { | 3550 } else if (graphicsLayer == m_decorationOutlineLayer.get()) { |
| 3540 name = "Decoration Layer"; | 3551 name = "Decoration Layer"; |
| 3541 } else { | 3552 } else { |
| 3542 NOTREACHED(); | 3553 NOTREACHED(); |
| 3543 } | 3554 } |
| 3544 | 3555 |
| 3545 return name; | 3556 return name; |
| 3546 } | 3557 } |
| 3547 | 3558 |
| 3548 } // namespace blink | 3559 } // namespace blink |
| OLD | NEW |