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

Issue 10940002: Add wrapper container for a vector of OwnPtr<T> (Closed)

Created:
8 years, 3 months ago by jamesr
Modified:
8 years, 3 months ago
Reviewers:
tfarina, enne (OOO)
CC:
chromium-reviews, cc-bugs_chromium.org
Visibility:
Public.

Description

Add wrapper container for a vector of OwnPtr<T> In cc we frequently use WTF::Vector<WTF::OwnPtr<T> > to store lists of single-ownership objects. In WTF this works nicely using template specialization in the container implementation. In chromium we use STL containers and can't modify the implementation, so this adds a wrapper to do roughly the same thing. BUG= Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=157699

Patch Set 1 #

Patch Set 2 : port CCLayerImpl::m_children over - still WIP #

Patch Set 3 : converts the rest of the Vector<OwnPtr<T>>s #

Total comments: 9

Patch Set 4 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+269 lines, -151 lines) Patch
M cc/CCDamageTrackerTest.cpp View 1 23 chunks +32 lines, -32 lines 0 comments Download
M cc/CCDebugRectHistory.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M cc/CCDirectRenderer.cpp View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M cc/CCKeyframedAnimationCurve.h View 3 chunks +3 lines, -2 lines 0 comments Download
M cc/CCKeyframedAnimationCurve.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M cc/CCLayerAnimationController.h View 2 chunks +2 lines, -2 lines 0 comments Download
M cc/CCLayerAnimationController.cpp View 1 2 chunks +2 lines, -2 lines 0 comments Download
M cc/CCLayerImpl.h View 1 3 chunks +3 lines, -2 lines 0 comments Download
M cc/CCLayerImpl.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M cc/CCLayerImplTest.cpp View 1 1 chunk +2 lines, -2 lines 0 comments Download
M cc/CCLayerTreeHost.h View 1 2 3 3 chunks +2 lines, -1 line 0 comments Download
M cc/CCLayerTreeHostCommon.h View 1 3 chunks +12 lines, -1 line 0 comments Download
M cc/CCLayerTreeHostCommon.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M cc/CCLayerTreeHostCommonTest.cpp View 1 14 chunks +33 lines, -33 lines 0 comments Download
M cc/CCLayerTreeHostImpl.cpp View 1 2 3 10 chunks +11 lines, -11 lines 0 comments Download
M cc/CCLayerTreeHostImplTest.cpp View 1 2 3 24 chunks +29 lines, -29 lines 0 comments Download
M cc/CCLayerTreeHostTest.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M cc/CCQuadCuller.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M cc/CCQuadCullerTest.cpp View 1 2 1 chunk +4 lines, -4 lines 0 comments Download
M cc/CCRenderPass.h View 1 2 3 chunks +3 lines, -2 lines 0 comments Download
M cc/CCRenderPassTest.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M cc/CCRenderSurfaceTest.cpp View 1 2 4 chunks +5 lines, -4 lines 0 comments Download
M cc/CCScrollbarAnimationControllerLinearFadeTest.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M cc/CCSolidColorLayerImplTest.cpp View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M cc/CCTiledLayerImplTest.cpp View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M cc/LayerChromium.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M cc/ScrollbarLayerChromiumTest.cpp View 1 2 3 3 chunks +5 lines, -5 lines 0 comments Download
M cc/TreeSynchronizer.cpp View 1 1 chunk +2 lines, -2 lines 0 comments Download
M cc/TreeSynchronizerTest.cpp View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
A cc/own_ptr_vector.h View 1 2 3 1 chunk +101 lines, -0 lines 0 comments Download
M cc/test/CCLayerTestCommon.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 11 (0 generated)
jamesr
I've converted some of the animation stuff over just to sanity check. What do you ...
8 years, 3 months ago (2012-09-17 23:38:01 UTC) #1
enne (OOO)
lgtm
8 years, 3 months ago (2012-09-17 23:45:43 UTC) #2
jamesr
This converts everything in cc away from Vector<OwnPtr<T>>. The differences between cc::OwnPtrVector and ScopedVector from ...
8 years, 3 months ago (2012-09-18 01:16:59 UTC) #3
enne (OOO)
https://codereview.chromium.org/10940002/diff/8001/cc/TreeSynchronizer.cpp File cc/TreeSynchronizer.cpp (right): https://codereview.chromium.org/10940002/diff/8001/cc/TreeSynchronizer.cpp#newcode41 cc/TreeSynchronizer.cpp:41: collectExistingCCLayerImplRecursive(oldLayers, children.take(i)); This looks like a bug. std::vector::erase removes ...
8 years, 3 months ago (2012-09-18 16:59:05 UTC) #4
jamesr
https://codereview.chromium.org/10940002/diff/8001/cc/TreeSynchronizer.cpp File cc/TreeSynchronizer.cpp (right): https://codereview.chromium.org/10940002/diff/8001/cc/TreeSynchronizer.cpp#newcode41 cc/TreeSynchronizer.cpp:41: collectExistingCCLayerImplRecursive(oldLayers, children.take(i)); On 2012/09/18 16:59:05, enne wrote: > This ...
8 years, 3 months ago (2012-09-18 20:49:35 UTC) #5
enne (OOO)
https://codereview.chromium.org/10940002/diff/8001/cc/TreeSynchronizer.cpp File cc/TreeSynchronizer.cpp (right): https://codereview.chromium.org/10940002/diff/8001/cc/TreeSynchronizer.cpp#newcode41 cc/TreeSynchronizer.cpp:41: collectExistingCCLayerImplRecursive(oldLayers, children.take(i)); On 2012/09/18 20:49:35, jamesr wrote: > On ...
8 years, 3 months ago (2012-09-18 21:51:18 UTC) #6
tfarina
https://chromiumcodereview.appspot.com/10940002/diff/8001/cc/own_ptr_vector.h File cc/own_ptr_vector.h (right): https://chromiumcodereview.appspot.com/10940002/diff/8001/cc/own_ptr_vector.h#newcode5 cc/own_ptr_vector.h:5: #ifndef CC_OWN_PTR_VECTOR_H CC_OWN_PTR_VECTOR_H_ https://chromiumcodereview.appspot.com/10940002/diff/8001/cc/own_ptr_vector.h#newcode18 cc/own_ptr_vector.h:18: class OwnPtrVector { very ...
8 years, 3 months ago (2012-09-19 03:34:57 UTC) #7
jamesr
Turns out TreeSynchronizerTest.syncSimpleTreeReusingLayers also catches the reuse bug, but I was testing pre-r157425 so I ...
8 years, 3 months ago (2012-09-19 20:24:05 UTC) #8
enne (OOO)
LGTM. Glad to hear the tests were actually failing. :)
8 years, 3 months ago (2012-09-19 21:24:11 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jamesr@chromium.org/10940002/13003
8 years, 3 months ago (2012-09-20 00:49:17 UTC) #10
commit-bot: I haz the power
8 years, 3 months ago (2012-09-20 03:34:04 UTC) #11
Change committed as 157699

Powered by Google App Engine
This is Rietveld 408576698