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

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

Issue 2449853004: Getting rid of DelegatedFrameData (Closed)
Patch Set: Compile error + auro widget 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
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 1647 matching lines...) Expand 10 before | Expand all | Expand 10 after
1658 1658
1659 // Collect all resource ids in the render passes into a single array. 1659 // Collect all resource ids in the render passes into a single array.
1660 ResourceProvider::ResourceIdArray resources; 1660 ResourceProvider::ResourceIdArray resources;
1661 for (const auto& render_pass : frame->render_passes) { 1661 for (const auto& render_pass : frame->render_passes) {
1662 for (auto* quad : render_pass->quad_list) { 1662 for (auto* quad : render_pass->quad_list) {
1663 for (ResourceId resource_id : quad->resources) 1663 for (ResourceId resource_id : quad->resources)
1664 resources.push_back(resource_id); 1664 resources.push_back(resource_id);
1665 } 1665 }
1666 } 1666 }
1667 1667
1668 auto data = base::MakeUnique<DelegatedFrameData>();
1669 resource_provider_->PrepareSendToParent(resources, &data->resource_list);
1670 data->render_pass_list = std::move(frame->render_passes);
1671 1668
1672 CompositorFrame compositor_frame; 1669 CompositorFrame compositor_frame;
1673 compositor_frame.metadata = std::move(metadata); 1670 compositor_frame.metadata = std::move(metadata);
1674 compositor_frame.delegated_frame_data = std::move(data); 1671 resource_provider_->PrepareSendToParent(resources,
1672 &compositor_frame.resource_list);
1673 compositor_frame.render_pass_list = std::move(frame->render_passes);
1675 compositor_frame_sink_->SubmitCompositorFrame(std::move(compositor_frame)); 1674 compositor_frame_sink_->SubmitCompositorFrame(std::move(compositor_frame));
1676 1675
1677 // The next frame should start by assuming nothing has changed, and changes 1676 // The next frame should start by assuming nothing has changed, and changes
1678 // are noted as they occur. 1677 // are noted as they occur.
1679 // TODO(boliu): If we did a temporary software renderer frame, propogate the 1678 // TODO(boliu): If we did a temporary software renderer frame, propogate the
1680 // damage forward to the next frame. 1679 // damage forward to the next frame.
1681 for (size_t i = 0; i < frame->render_surface_layer_list->size(); i++) { 1680 for (size_t i = 0; i < frame->render_surface_layer_list->size(); i++) {
1682 auto* surface = (*frame->render_surface_layer_list)[i]->render_surface(); 1681 auto* surface = (*frame->render_surface_layer_list)[i]->render_surface();
1683 surface->damage_tracker()->DidDrawDamagedArea(); 1682 surface->damage_tracker()->DidDrawDamagedArea();
1684 } 1683 }
(...skipping 2403 matching lines...) Expand 10 before | Expand all | Expand 10 after
4088 if (is_visible) { 4087 if (is_visible) {
4089 worker_context_visibility_ = 4088 worker_context_visibility_ =
4090 worker_context->CacheController()->ClientBecameVisible(); 4089 worker_context->CacheController()->ClientBecameVisible();
4091 } else { 4090 } else {
4092 worker_context->CacheController()->ClientBecameNotVisible( 4091 worker_context->CacheController()->ClientBecameNotVisible(
4093 std::move(worker_context_visibility_)); 4092 std::move(worker_context_visibility_));
4094 } 4093 }
4095 } 4094 }
4096 4095
4097 } // namespace cc 4096 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698