Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1000)

Side by Side Diff: third_party/WebKit/Source/core/layout/compositing/CompositingRequirementsUpdater.cpp

Issue 2776203002: Migrate WTF::Vector::remove() to ::erase() (Closed)
Patch Set: rebase, repatch VectorTest Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698