Index: cc/layers/layer_impl.cc |
diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc |
index 4f6110442eca4c506945e1e5e923558e5347daba..c1e9727da8353754020c1f70eb9cf065e849b60f 100644 |
--- a/cc/layers/layer_impl.cc |
+++ b/cc/layers/layer_impl.cc |
@@ -136,7 +136,7 @@ scoped_ptr<LayerImpl> LayerImpl::RemoveChild(LayerImpl* child) { |
it != children_.end(); |
++it) { |
if (*it == child) { |
- scoped_ptr<LayerImpl> ret = children_.take(it); |
+ scoped_ptr<LayerImpl> ret = it->Pass(); |
children_.erase(it); |
layer_tree_impl()->set_needs_update_draw_properties(); |
return ret.Pass(); |
danakj
2015/11/17 01:12:17
oops, shame on me
vmpstr
2015/11/17 23:26:24
Done.
|
@@ -260,7 +260,8 @@ void LayerImpl::SetEffectTreeIndex(int index) { |
SetNeedsPushProperties(); |
} |
-void LayerImpl::PassCopyRequests(ScopedPtrVector<CopyOutputRequest>* requests) { |
+void LayerImpl::PassCopyRequests( |
+ std::vector<scoped_ptr<CopyOutputRequest>>* requests) { |
// In the case that a layer still has a copy request, this means that there's |
// a commit to the active tree without a draw. This only happens in some |
// edge cases during lost context or visibility changes, so don't try to |
@@ -276,7 +277,8 @@ void LayerImpl::PassCopyRequests(ScopedPtrVector<CopyOutputRequest>* requests) { |
DCHECK(render_surface()); |
bool was_empty = copy_requests_.empty(); |
- copy_requests_.insert_and_take(copy_requests_.end(), requests); |
+ for (auto it = requests->begin(); it != requests->end(); ++it) |
ericrk
2015/11/16 21:59:49
not sure if we can use it, but a more C++11-y way
danakj
2015/11/17 01:12:17
Cool! Someone should propose it to cxx@ now that m
vmpstr
2015/11/17 23:26:23
I could do it as
std::move(requests->begin(), re
vmpstr
2015/11/17 23:26:24
Done.
|
+ copy_requests_.push_back(it->Pass()); |
requests->clear(); |
if (was_empty && layer_tree_impl()->IsActiveTree()) |
@@ -285,17 +287,18 @@ void LayerImpl::PassCopyRequests(ScopedPtrVector<CopyOutputRequest>* requests) { |
} |
void LayerImpl::TakeCopyRequestsAndTransformToTarget( |
- ScopedPtrVector<CopyOutputRequest>* requests) { |
+ std::vector<scoped_ptr<CopyOutputRequest>>* requests) { |
DCHECK(!copy_requests_.empty()); |
DCHECK(layer_tree_impl()->IsActiveTree()); |
DCHECK_EQ(render_target(), this); |
size_t first_inserted_request = requests->size(); |
- requests->insert_and_take(requests->end(), ©_requests_); |
+ for (auto it = copy_requests_.begin(); it != copy_requests_.end(); ++it) |
ericrk
2015/11/16 21:59:49
same here.
|
+ requests->push_back(it->Pass()); |
copy_requests_.clear(); |
for (size_t i = first_inserted_request; i < requests->size(); ++i) { |
- CopyOutputRequest* request = requests->at(i); |
+ CopyOutputRequest* request = (*requests)[i].get(); |
if (!request->has_area()) |
continue; |