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

Side by Side Diff: cc/trees/layer_tree_host_impl.cc

Issue 2449853004: Getting rid of DelegatedFrameData (Closed)
Patch Set: nit Created 4 years, 1 month 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
« no previous file with comments | « cc/test/test_compositor_frame_sink.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/trees/layer_tree_host_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1637 matching lines...) Expand 10 before | Expand all | Expand 10 after
1648 1648
1649 // Collect all resource ids in the render passes into a single array. 1649 // Collect all resource ids in the render passes into a single array.
1650 ResourceProvider::ResourceIdArray resources; 1650 ResourceProvider::ResourceIdArray resources;
1651 for (const auto& render_pass : frame->render_passes) { 1651 for (const auto& render_pass : frame->render_passes) {
1652 for (auto* quad : render_pass->quad_list) { 1652 for (auto* quad : render_pass->quad_list) {
1653 for (ResourceId resource_id : quad->resources) 1653 for (ResourceId resource_id : quad->resources)
1654 resources.push_back(resource_id); 1654 resources.push_back(resource_id);
1655 } 1655 }
1656 } 1656 }
1657 1657
1658 auto data = base::MakeUnique<DelegatedFrameData>();
1659 resource_provider_->PrepareSendToParent(resources, &data->resource_list);
1660 data->render_pass_list = std::move(frame->render_passes);
1661 1658
1662 CompositorFrame compositor_frame; 1659 CompositorFrame compositor_frame;
1663 compositor_frame.metadata = std::move(metadata); 1660 compositor_frame.metadata = std::move(metadata);
1664 compositor_frame.delegated_frame_data = std::move(data); 1661 resource_provider_->PrepareSendToParent(resources,
1662 &compositor_frame.resource_list);
1663 compositor_frame.render_pass_list = std::move(frame->render_passes);
1665 compositor_frame_sink_->SubmitCompositorFrame(std::move(compositor_frame)); 1664 compositor_frame_sink_->SubmitCompositorFrame(std::move(compositor_frame));
1666 1665
1667 // The next frame should start by assuming nothing has changed, and changes 1666 // The next frame should start by assuming nothing has changed, and changes
1668 // are noted as they occur. 1667 // are noted as they occur.
1669 // TODO(boliu): If we did a temporary software renderer frame, propogate the 1668 // TODO(boliu): If we did a temporary software renderer frame, propogate the
1670 // damage forward to the next frame. 1669 // damage forward to the next frame.
1671 for (size_t i = 0; i < frame->render_surface_layer_list->size(); i++) { 1670 for (size_t i = 0; i < frame->render_surface_layer_list->size(); i++) {
1672 auto* surface = (*frame->render_surface_layer_list)[i]->render_surface(); 1671 auto* surface = (*frame->render_surface_layer_list)[i]->render_surface();
1673 surface->damage_tracker()->DidDrawDamagedArea(); 1672 surface->damage_tracker()->DidDrawDamagedArea();
1674 } 1673 }
(...skipping 2400 matching lines...) Expand 10 before | Expand all | Expand 10 after
4075 worker_context_visibility_ = 4074 worker_context_visibility_ =
4076 worker_context->CacheController()->ClientBecameVisible(); 4075 worker_context->CacheController()->ClientBecameVisible();
4077 } else { 4076 } else {
4078 worker_context->CacheController()->ClientBecameNotVisible( 4077 worker_context->CacheController()->ClientBecameNotVisible(
4079 std::move(worker_context_visibility_)); 4078 std::move(worker_context_visibility_));
4080 } 4079 }
4081 } 4080 }
4082 } 4081 }
4083 4082
4084 } // namespace cc 4083 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/test_compositor_frame_sink.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698