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

Unified Diff: cc/quads/list_container.h

Issue 979693005: Add underlays and split off common overlay functionality (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: overlay test changes Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/output/overlay_unittest.cc ('k') | cc/quads/list_container_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/quads/list_container.h
diff --git a/cc/quads/list_container.h b/cc/quads/list_container.h
index dd313fc8b45bc67d1b7568bea2dd0d0fe81e6a14..94754aba81aab855041776c761cdb1d1dc0adb73 100644
--- a/cc/quads/list_container.h
+++ b/cc/quads/list_container.h
@@ -209,6 +209,12 @@ class CC_EXPORT ListContainer {
return new (Allocate(sizeof(DerivedElementType)))
DerivedElementType(*source);
}
+ // Construct a new element on top of an existing one.
+ template <typename DerivedElementType>
+ DerivedElementType* ReplaceExistingElement(Iterator at) {
+ at->~BaseElementType();
+ return new (*at) DerivedElementType();
+ }
size_t size() const;
bool empty() const;
« no previous file with comments | « cc/output/overlay_unittest.cc ('k') | cc/quads/list_container_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698