| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 RemoveFromSquashingLayer | 210 RemoveFromSquashingLayer |
| 211 }; | 211 }; |
| 212 | 212 |
| 213 struct SquashingState { | 213 struct SquashingState { |
| 214 SquashingState() | 214 SquashingState() |
| 215 : mostRecentMapping(0) | 215 : mostRecentMapping(0) |
| 216 , hasMostRecentMapping(false) | 216 , hasMostRecentMapping(false) |
| 217 , nextSquashedLayerIndex(0) | 217 , nextSquashedLayerIndex(0) |
| 218 , clippingAncestorForMostRecentMapping(0) { } | 218 , clippingAncestorForMostRecentMapping(0) { } |
| 219 | 219 |
| 220 void updateSquashingStateForNewMapping(CompositedLayerMappingPtr, bool h
asNewCompositedLayerMapping, IntPoint newOffsetFromAbsoluteForSquashingCLM, Rend
erLayer* clippingAncestorForMostRecentMapping); | 220 void updateSquashingStateForNewMapping(CompositedLayerMappingPtr, bool h
asNewCompositedLayerMapping, LayoutPoint newOffsetFromAbsoluteForSquashingCLM, R
enderLayer* clippingAncestorForMostRecentMapping); |
| 221 | 221 |
| 222 // The most recent composited backing that the layer should squash onto
if needed. | 222 // The most recent composited backing that the layer should squash onto
if needed. |
| 223 CompositedLayerMappingPtr mostRecentMapping; | 223 CompositedLayerMappingPtr mostRecentMapping; |
| 224 bool hasMostRecentMapping; | 224 bool hasMostRecentMapping; |
| 225 | 225 |
| 226 // Absolute coordinates of the compositedLayerMapping's owning layer. Th
is is used for computing the correct | 226 // Absolute coordinates of the compositedLayerMapping's owning layer. Th
is is used for computing the correct |
| 227 // positions of renderlayers when they paint into the squashing layer. | 227 // positions of renderlayers when they paint into the squashing layer. |
| 228 IntPoint offsetFromAbsoluteForSquashingCLM; | 228 LayoutPoint offsetFromAbsoluteForSquashingCLM; |
| 229 | 229 |
| 230 // Counter that tracks what index the next RenderLayer would be if it ge
ts squashed to the current squashing layer. | 230 // Counter that tracks what index the next RenderLayer would be if it ge
ts squashed to the current squashing layer. |
| 231 size_t nextSquashedLayerIndex; | 231 size_t nextSquashedLayerIndex; |
| 232 | 232 |
| 233 RenderLayer* clippingAncestorForMostRecentMapping; | 233 RenderLayer* clippingAncestorForMostRecentMapping; |
| 234 }; | 234 }; |
| 235 | 235 |
| 236 bool canSquashIntoCurrentSquashingOwner(const RenderLayer* candidate, const
SquashingState&, const RenderLayer* clippingAncestor); | 236 bool canSquashIntoCurrentSquashingOwner(const RenderLayer* candidate, const
SquashingState&, const RenderLayer* clippingAncestor); |
| 237 | 237 |
| 238 CompositingStateTransitionType computeCompositedLayerUpdate(RenderLayer*); | 238 CompositingStateTransitionType computeCompositedLayerUpdate(RenderLayer*); |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 OwnPtr<GraphicsLayer> m_layerForScrollCorner; | 372 OwnPtr<GraphicsLayer> m_layerForScrollCorner; |
| 373 #if USE(RUBBER_BANDING) | 373 #if USE(RUBBER_BANDING) |
| 374 OwnPtr<GraphicsLayer> m_layerForOverhangShadow; | 374 OwnPtr<GraphicsLayer> m_layerForOverhangShadow; |
| 375 #endif | 375 #endif |
| 376 }; | 376 }; |
| 377 | 377 |
| 378 | 378 |
| 379 } // namespace WebCore | 379 } // namespace WebCore |
| 380 | 380 |
| 381 #endif // RenderLayerCompositor_h | 381 #endif // RenderLayerCompositor_h |
| OLD | NEW |