| Index: cc/layers/layer_impl.cc
|
| diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc
|
| index 8ad4c011597ac57e884a3f883e8d4b2f553c638b..d23e058790022faf9cc37c8bb0c51441eeabd87d 100644
|
| --- a/cc/layers/layer_impl.cc
|
| +++ b/cc/layers/layer_impl.cc
|
| @@ -96,8 +96,6 @@ LayerImpl::LayerImpl(LayerTreeImpl* tree_impl, int id)
|
| LayerImpl::~LayerImpl() {
|
| DCHECK_EQ(DRAW_MODE_NONE, current_draw_mode_);
|
|
|
| - if (!copy_requests_.empty() && layer_tree_impl_->IsActiveTree())
|
| - layer_tree_impl()->RemoveLayerWithCopyOutputRequest(this);
|
| layer_tree_impl_->UnregisterScrollLayer(this);
|
| layer_tree_impl_->UnregisterLayer(this);
|
| layer_tree_impl_->RemoveLayerShouldPushProperties(this);
|
| @@ -207,57 +205,6 @@ void LayerImpl::SetScrollTreeIndex(int index) {
|
| SetNeedsPushProperties();
|
| }
|
|
|
| -void LayerImpl::PassCopyRequests(
|
| - std::vector<std::unique_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
|
| - // handle preserving these output requests (and their surface).
|
| - if (!copy_requests_.empty()) {
|
| - layer_tree_impl()->RemoveLayerWithCopyOutputRequest(this);
|
| - // Destroying these will abort them.
|
| - copy_requests_.clear();
|
| - }
|
| -
|
| - if (requests->empty())
|
| - return;
|
| -
|
| - bool was_empty = copy_requests_.empty();
|
| - for (auto& request : *requests)
|
| - copy_requests_.push_back(std::move(request));
|
| - requests->clear();
|
| -
|
| - if (was_empty && layer_tree_impl()->IsActiveTree())
|
| - layer_tree_impl()->AddLayerWithCopyOutputRequest(this);
|
| -}
|
| -
|
| -void LayerImpl::TakeCopyRequestsAndTransformToTarget(
|
| - std::vector<std::unique_ptr<CopyOutputRequest>>* requests) {
|
| - DCHECK(!copy_requests_.empty());
|
| - DCHECK(layer_tree_impl()->IsActiveTree());
|
| - DCHECK(has_render_surface());
|
| - DCHECK_EQ(render_target(), render_surface());
|
| -
|
| - size_t first_inserted_request = requests->size();
|
| - for (auto& request : copy_requests_)
|
| - requests->push_back(std::move(request));
|
| - copy_requests_.clear();
|
| -
|
| - for (size_t i = first_inserted_request; i < requests->size(); ++i) {
|
| - CopyOutputRequest* request = (*requests)[i].get();
|
| - if (!request->has_area())
|
| - continue;
|
| -
|
| - gfx::Rect request_in_layer_space = request->area();
|
| - request_in_layer_space.Intersect(gfx::Rect(bounds()));
|
| - request->set_area(MathUtil::MapEnclosingClippedRect(
|
| - DrawTransform(), request_in_layer_space));
|
| - }
|
| -
|
| - layer_tree_impl()->RemoveLayerWithCopyOutputRequest(this);
|
| - layer_tree_impl()->set_needs_update_draw_properties();
|
| -}
|
| -
|
| void LayerImpl::ClearRenderSurfaceLayerList() {
|
| if (render_surface_)
|
| render_surface_->ClearLayerLists();
|
| @@ -461,8 +408,6 @@ void LayerImpl::PushPropertiesTo(LayerImpl* layer) {
|
| layer->SetScrollTreeIndex(scroll_tree_index_);
|
| layer->set_offset_to_transform_parent(offset_to_transform_parent_);
|
|
|
| - layer->PassCopyRequests(©_requests_);
|
| -
|
| // If the main thread commits multiple times before the impl thread actually
|
| // draws, then damage tracking will become incorrect if we simply clobber the
|
| // update_rect here. The LayerImpl's update_rect needs to accumulate (i.e.
|
|
|