OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/surfaces/surface_aggregator.h" | 5 #include "cc/surfaces/surface_aggregator.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 | 10 |
(...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
844 contained_surfaces_[surface_id] = surface->frame_index(); | 844 contained_surfaces_[surface_id] = surface->frame_index(); |
845 | 845 |
846 if (!surface->HasActiveFrame()) | 846 if (!surface->HasActiveFrame()) |
847 return CompositorFrame(); | 847 return CompositorFrame(); |
848 | 848 |
849 const CompositorFrame& root_surface_frame = surface->GetActiveFrame(); | 849 const CompositorFrame& root_surface_frame = surface->GetActiveFrame(); |
850 TRACE_EVENT0("cc", "SurfaceAggregator::Aggregate"); | 850 TRACE_EVENT0("cc", "SurfaceAggregator::Aggregate"); |
851 | 851 |
852 CompositorFrame frame; | 852 CompositorFrame frame; |
853 | 853 |
854 dest_resource_list_ = &frame.resource_list; | |
855 dest_pass_list_ = &frame.render_pass_list; | 854 dest_pass_list_ = &frame.render_pass_list; |
856 | 855 |
857 valid_surfaces_.clear(); | 856 valid_surfaces_.clear(); |
858 PrewalkResult prewalk_result; | 857 PrewalkResult prewalk_result; |
859 root_damage_rect_ = PrewalkTree(surface_id, false, 0, &prewalk_result); | 858 root_damage_rect_ = PrewalkTree(surface_id, false, 0, &prewalk_result); |
860 PropagateCopyRequestPasses(); | 859 PropagateCopyRequestPasses(); |
861 has_copy_requests_ = !copy_request_passes_.empty(); | 860 has_copy_requests_ = !copy_request_passes_.empty(); |
862 frame.metadata.may_contain_video = prewalk_result.may_contain_video; | 861 frame.metadata.may_contain_video = prewalk_result.may_contain_video; |
863 | 862 |
864 CopyUndrawnSurfaces(&prewalk_result); | 863 CopyUndrawnSurfaces(&prewalk_result); |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
931 } | 930 } |
932 | 931 |
933 void SurfaceAggregator::SetOutputColorSpace( | 932 void SurfaceAggregator::SetOutputColorSpace( |
934 const gfx::ColorSpace& blending_color_space, | 933 const gfx::ColorSpace& blending_color_space, |
935 const gfx::ColorSpace& output_color_space) { | 934 const gfx::ColorSpace& output_color_space) { |
936 blending_color_space_ = blending_color_space; | 935 blending_color_space_ = blending_color_space; |
937 output_color_space_ = output_color_space; | 936 output_color_space_ = output_color_space; |
938 } | 937 } |
939 | 938 |
940 } // namespace cc | 939 } // namespace cc |
OLD | NEW |