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 * | 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 894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
905 CompositingReasons reasons = m_compositingReasonFinder.styleDeterminedReason
s(layer->renderer()); | 905 CompositingReasons reasons = m_compositingReasonFinder.styleDeterminedReason
s(layer->renderer()); |
906 layer->setStyleDeterminedCompositingReasons(reasons); | 906 layer->setStyleDeterminedCompositingReasons(reasons); |
907 } | 907 } |
908 | 908 |
909 void RenderLayerCompositor::updateDirectCompositingReasons(RenderLayer* layer) | 909 void RenderLayerCompositor::updateDirectCompositingReasons(RenderLayer* layer) |
910 { | 910 { |
911 CompositingReasons reasons = m_compositingReasonFinder.directReasons(layer,
&m_needsToRecomputeCompositingRequirements); | 911 CompositingReasons reasons = m_compositingReasonFinder.directReasons(layer,
&m_needsToRecomputeCompositingRequirements); |
912 layer->setCompositingReasons(reasons, CompositingReasonComboAllDirectReasons
); | 912 layer->setCompositingReasons(reasons, CompositingReasonComboAllDirectReasons
); |
913 } | 913 } |
914 | 914 |
| 915 void RenderLayerCompositor::setOverlayLayer(GraphicsLayer* layer) |
| 916 { |
| 917 ASSERT(rootGraphicsLayer()); |
| 918 |
| 919 if (layer->parent() != m_overflowControlsHostLayer.get()) |
| 920 m_overflowControlsHostLayer->addChild(layer); |
| 921 } |
| 922 |
915 bool RenderLayerCompositor::canBeComposited(const RenderLayer* layer) const | 923 bool RenderLayerCompositor::canBeComposited(const RenderLayer* layer) const |
916 { | 924 { |
917 // FIXME: We disable accelerated compositing for elements in a RenderFlowThr
ead as it doesn't work properly. | 925 // FIXME: We disable accelerated compositing for elements in a RenderFlowThr
ead as it doesn't work properly. |
918 // See http://webkit.org/b/84900 to re-enable it. | 926 // See http://webkit.org/b/84900 to re-enable it. |
919 return m_hasAcceleratedCompositing && layer->isSelfPaintingLayer() && !layer
->subtreeIsInvisible() && layer->renderer()->flowThreadState() == RenderObject::
NotInsideFlowThread; | 927 return m_hasAcceleratedCompositing && layer->isSelfPaintingLayer() && !layer
->subtreeIsInvisible() && layer->renderer()->flowThreadState() == RenderObject::
NotInsideFlowThread; |
920 } | 928 } |
921 | 929 |
922 // Return true if the given layer has some ancestor in the RenderLayer hierarchy
that clips, | 930 // Return true if the given layer has some ancestor in the RenderLayer hierarchy
that clips, |
923 // up to the enclosing compositing ancestor. This is required because compositin
g layers are parented | 931 // up to the enclosing compositing ancestor. This is required because compositin
g layers are parented |
924 // according to the z-order hierarchy, yet clipping goes down the renderer hiera
rchy. | 932 // according to the z-order hierarchy, yet clipping goes down the renderer hiera
rchy. |
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1418 } else if (graphicsLayer == m_scrollLayer.get()) { | 1426 } else if (graphicsLayer == m_scrollLayer.get()) { |
1419 name = "LocalFrame Scrolling Layer"; | 1427 name = "LocalFrame Scrolling Layer"; |
1420 } else { | 1428 } else { |
1421 ASSERT_NOT_REACHED(); | 1429 ASSERT_NOT_REACHED(); |
1422 } | 1430 } |
1423 | 1431 |
1424 return name; | 1432 return name; |
1425 } | 1433 } |
1426 | 1434 |
1427 } // namespace WebCore | 1435 } // namespace WebCore |
OLD | NEW |