| 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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 if (layer->scrollsWithRespectTo(unclippedDescendant)) | 281 if (layer->scrollsWithRespectTo(unclippedDescendant)) |
| 282 reasonsToComposite |= CompositingReasonAssumedOverlap; | 282 reasonsToComposite |= CompositingReasonAssumedOverlap; |
| 283 } | 283 } |
| 284 | 284 |
| 285 // Remove irrelevant unclipped descendants in reverse order so our stored | 285 // Remove irrelevant unclipped descendants in reverse order so our stored |
| 286 // indices remain valid. | 286 // indices remain valid. |
| 287 for (size_t i = 0; i < unclippedDescendantsToRemove.size(); i++) | 287 for (size_t i = 0; i < unclippedDescendantsToRemove.size(); i++) |
| 288 unclippedDescendants.remove(unclippedDescendantsToRemove.at( | 288 unclippedDescendants.remove(unclippedDescendantsToRemove.at( |
| 289 unclippedDescendantsToRemove.size() - i - 1)); | 289 unclippedDescendantsToRemove.size() - i - 1)); |
| 290 | 290 |
| 291 if (layer->clipParent()) { | 291 if (reasonsToComposite & CompositingReasonOutOfFlowClipping) { |
| 292 // TODO(schenney): We only need to promote when the clipParent is not a de
scendant of the ancestor scroller, | 292 // TODO(schenney): We only need to promote when the clipParent is not a de
scendant of the ancestor scroller, |
| 293 // which we do not check for here. Hence we might be promoting needlessly. | 293 // which we do not check for here. Hence we might be promoting needlessly. |
| 294 unclippedDescendants.append(layer); | 294 unclippedDescendants.append(layer); |
| 295 } | 295 } |
| 296 } | 296 } |
| 297 | 297 |
| 298 const IntRect& absBounds = layer->clippedAbsoluteBoundingBox(); | 298 const IntRect& absBounds = layer->clippedAbsoluteBoundingBox(); |
| 299 absoluteDescendantBoundingBox = absBounds; | 299 absoluteDescendantBoundingBox = absBounds; |
| 300 | 300 |
| 301 if (currentRecursionData.m_testingOverlap && | 301 if (currentRecursionData.m_testingOverlap && |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 475 | 475 |
| 476 descendantHas3DTransform |= | 476 descendantHas3DTransform |= |
| 477 anyDescendantHas3DTransform || layer->has3DTransform(); | 477 anyDescendantHas3DTransform || layer->has3DTransform(); |
| 478 } | 478 } |
| 479 | 479 |
| 480 // At this point we have finished collecting all reasons to composite this lay
er. | 480 // At this point we have finished collecting all reasons to composite this lay
er. |
| 481 layer->setCompositingReasons(reasonsToComposite); | 481 layer->setCompositingReasons(reasonsToComposite); |
| 482 } | 482 } |
| 483 | 483 |
| 484 } // namespace blink | 484 } // namespace blink |
| OLD | NEW |