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 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 unclippedDescendantsToRemove.push_back(i); | 324 unclippedDescendantsToRemove.push_back(i); |
325 continue; | 325 continue; |
326 } | 326 } |
327 if (layer->scrollsWithRespectTo(unclippedDescendant)) | 327 if (layer->scrollsWithRespectTo(unclippedDescendant)) |
328 reasonsToComposite |= CompositingReasonAssumedOverlap; | 328 reasonsToComposite |= CompositingReasonAssumedOverlap; |
329 } | 329 } |
330 | 330 |
331 // Remove irrelevant unclipped descendants in reverse order so our stored | 331 // Remove irrelevant unclipped descendants in reverse order so our stored |
332 // indices remain valid. | 332 // indices remain valid. |
333 for (size_t i = 0; i < unclippedDescendantsToRemove.size(); i++) { | 333 for (size_t i = 0; i < unclippedDescendantsToRemove.size(); i++) { |
334 unclippedDescendants.remove(unclippedDescendantsToRemove.at( | 334 unclippedDescendants.erase(unclippedDescendantsToRemove.at( |
335 unclippedDescendantsToRemove.size() - i - 1)); | 335 unclippedDescendantsToRemove.size() - i - 1)); |
336 } | 336 } |
337 | 337 |
338 if (reasonsToComposite & CompositingReasonOutOfFlowClipping) { | 338 if (reasonsToComposite & CompositingReasonOutOfFlowClipping) { |
339 // TODO(schenney): We only need to promote when the clipParent is not a | 339 // TODO(schenney): We only need to promote when the clipParent is not a |
340 // descendant of the ancestor scroller, which we do not check for here. | 340 // descendant of the ancestor scroller, which we do not check for here. |
341 // Hence we might be promoting needlessly. | 341 // Hence we might be promoting needlessly. |
342 unclippedDescendants.push_back(layer); | 342 unclippedDescendants.push_back(layer); |
343 } | 343 } |
344 } | 344 } |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
538 descendantHas3DTransform |= | 538 descendantHas3DTransform |= |
539 anyDescendantHas3DTransform || layer->has3DTransform(); | 539 anyDescendantHas3DTransform || layer->has3DTransform(); |
540 } | 540 } |
541 | 541 |
542 // At this point we have finished collecting all reasons to composite this | 542 // At this point we have finished collecting all reasons to composite this |
543 // layer. | 543 // layer. |
544 layer->setCompositingReasons(reasonsToComposite); | 544 layer->setCompositingReasons(reasonsToComposite); |
545 } | 545 } |
546 | 546 |
547 } // namespace blink | 547 } // namespace blink |
OLD | NEW |