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 638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
649 } | 649 } |
650 | 650 |
651 static IntPoint computeOffsetFromAbsolute(RenderLayer* layer) | 651 static IntPoint computeOffsetFromAbsolute(RenderLayer* layer) |
652 { | 652 { |
653 TransformState transformState(TransformState::ApplyTransformDirection, Float Point()); | 653 TransformState transformState(TransformState::ApplyTransformDirection, Float Point()); |
654 layer->renderer()->mapLocalToContainer(0, transformState, ApplyContainerFlip ); | 654 layer->renderer()->mapLocalToContainer(0, transformState, ApplyContainerFlip ); |
655 transformState.flatten(); | 655 transformState.flatten(); |
656 return roundedIntPoint(transformState.lastPlanarPoint()); | 656 return roundedIntPoint(transformState.lastPlanarPoint()); |
657 } | 657 } |
658 | 658 |
659 bool RenderLayerCompositor::updateSquashingAssignment(RenderLayer* layer, Squash ingState& squashingState, const CompositingStateTransitionType compositedLayerUp date) | 659 bool RenderLayerCompositor::updateSquashingAssignment(RenderLayer* layer, Squash ingState& squashingState, const CompositingStateTransitionType compositedLayerUp date) |
abarth-chromium
2014/03/17 17:17:03
What's the difference between these two updateSqua
| |
660 { | 660 { |
661 | 661 |
662 // NOTE: In the future as we generalize this, the background of this layer m ay need to be assigned to a different backing than | 662 // NOTE: In the future as we generalize this, the background of this layer m ay need to be assigned to a different backing than |
663 // the squashed RenderLayer's own primary contents. This would happen when w e have a composited negative z-index element that needs | 663 // the squashed RenderLayer's own primary contents. This would happen when w e have a composited negative z-index element that needs |
664 // to paint on top of the background, but below the layer's main contents. F or now, because we always composite layers | 664 // to paint on top of the background, but below the layer's main contents. F or now, because we always composite layers |
665 // when they have a composited negative z-index child, such layers will neve r need squashing so it is not yet an issue. | 665 // when they have a composited negative z-index child, such layers will neve r need squashing so it is not yet an issue. |
666 if (compositedLayerUpdate == PutInSquashingLayer) { | 666 if (compositedLayerUpdate == PutInSquashingLayer) { |
667 // A layer that is squashed with other layers cannot have its own Compos itedLayerMapping. | 667 // A layer that is squashed with other layers cannot have its own Compos itedLayerMapping. |
668 ASSERT(!layer->hasCompositedLayerMapping()); | 668 ASSERT(!layer->hasCompositedLayerMapping()); |
669 ASSERT(squashingState.hasMostRecentMapping); | 669 ASSERT(squashingState.hasMostRecentMapping); |
(...skipping 18 matching lines...) Expand all Loading... | |
688 // FIXME: it seems premature to compute this before all compositing stat e has been updated? | 688 // FIXME: it seems premature to compute this before all compositing stat e has been updated? |
689 // This layer and all of its descendants have cached repaints rects that are relative to | 689 // This layer and all of its descendants have cached repaints rects that are relative to |
690 // the repaint container, so change when compositing changes; we need to update them here. | 690 // the repaint container, so change when compositing changes; we need to update them here. |
691 | 691 |
692 // FIXME: what's up with parent()? | 692 // FIXME: what's up with parent()? |
693 if (layer->parent()) | 693 if (layer->parent()) |
694 layer->repainter().computeRepaintRectsIncludingDescendants(); | 694 layer->repainter().computeRepaintRectsIncludingDescendants(); |
695 | 695 |
696 return true; | 696 return true; |
697 } else if (compositedLayerUpdate == RemoveFromSquashingLayer) { | 697 } else if (compositedLayerUpdate == RemoveFromSquashingLayer) { |
698 if (layer->groupedMapping()) | |
699 layer->groupedMapping()->setNeedsGeometryUpdate(); | |
698 layer->setGroupedMapping(0); | 700 layer->setGroupedMapping(0); |
abarth-chromium
2014/03/17 17:17:03
Maybe this call to setNeedsGeometryUpdate should h
chrishtr
2014/03/17 18:10:55
Done.
| |
699 | 701 |
700 // This layer and all of its descendants have cached repaints rects that are relative to | 702 // This layer and all of its descendants have cached repaints rects that are relative to |
701 // the repaint container, so change when compositing changes; we need to update them here. | 703 // the repaint container, so change when compositing changes; we need to update them here. |
702 layer->repainter().computeRepaintRectsIncludingDescendants(); | 704 layer->repainter().computeRepaintRectsIncludingDescendants(); |
703 | 705 |
704 // If we need to repaint, do so now that we've removed it from a squashe d layer | 706 // If we need to repaint, do so now that we've removed it from a squashe d layer |
705 repaintOnCompositingChange(layer); | 707 repaintOnCompositingChange(layer); |
706 | 708 |
707 layer->setLostGroupedMapping(false); | 709 layer->setLostGroupedMapping(false); |
708 return true; | 710 return true; |
(...skipping 1539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2248 } else if (graphicsLayer == m_scrollLayer.get()) { | 2250 } else if (graphicsLayer == m_scrollLayer.get()) { |
2249 name = "LocalFrame Scrolling Layer"; | 2251 name = "LocalFrame Scrolling Layer"; |
2250 } else { | 2252 } else { |
2251 ASSERT_NOT_REACHED(); | 2253 ASSERT_NOT_REACHED(); |
2252 } | 2254 } |
2253 | 2255 |
2254 return name; | 2256 return name; |
2255 } | 2257 } |
2256 | 2258 |
2257 } // namespace WebCore | 2259 } // namespace WebCore |
OLD | NEW |