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 "components/viz/service/display/surface_aggregator.h" | 5 #include "components/viz/service/display/surface_aggregator.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 | 10 |
(...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
815 // CopyPasses may have mutated container, need to re-query to erase. | 815 // CopyPasses may have mutated container, need to re-query to erase. |
816 referenced_surfaces_.erase(referenced_surfaces_.find(surface_id)); | 816 referenced_surfaces_.erase(referenced_surfaces_.find(surface_id)); |
817 } | 817 } |
818 } | 818 } |
819 } | 819 } |
820 | 820 |
821 void SurfaceAggregator::PropagateCopyRequestPasses() { | 821 void SurfaceAggregator::PropagateCopyRequestPasses() { |
822 std::vector<cc::RenderPassId> copy_requests_to_iterate( | 822 std::vector<cc::RenderPassId> copy_requests_to_iterate( |
823 copy_request_passes_.begin(), copy_request_passes_.end()); | 823 copy_request_passes_.begin(), copy_request_passes_.end()); |
824 while (!copy_requests_to_iterate.empty()) { | 824 while (!copy_requests_to_iterate.empty()) { |
825 int first = copy_requests_to_iterate.back(); | 825 cc::RenderPassId first = copy_requests_to_iterate.back(); |
826 copy_requests_to_iterate.pop_back(); | 826 copy_requests_to_iterate.pop_back(); |
827 auto it = render_pass_dependencies_.find(first); | 827 auto it = render_pass_dependencies_.find(first); |
828 if (it == render_pass_dependencies_.end()) | 828 if (it == render_pass_dependencies_.end()) |
829 continue; | 829 continue; |
830 for (auto pass : it->second) { | 830 for (auto pass : it->second) { |
831 if (copy_request_passes_.insert(pass).second) { | 831 if (copy_request_passes_.insert(pass).second) { |
832 copy_requests_to_iterate.push_back(pass); | 832 copy_requests_to_iterate.push_back(pass); |
833 } | 833 } |
834 } | 834 } |
835 } | 835 } |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
933 const gfx::ColorSpace& output_color_space) { | 933 const gfx::ColorSpace& output_color_space) { |
934 blending_color_space_ = blending_color_space.IsValid() | 934 blending_color_space_ = blending_color_space.IsValid() |
935 ? blending_color_space | 935 ? blending_color_space |
936 : gfx::ColorSpace::CreateSRGB(); | 936 : gfx::ColorSpace::CreateSRGB(); |
937 output_color_space_ = output_color_space.IsValid() | 937 output_color_space_ = output_color_space.IsValid() |
938 ? output_color_space | 938 ? output_color_space |
939 : gfx::ColorSpace::CreateSRGB(); | 939 : gfx::ColorSpace::CreateSRGB(); |
940 } | 940 } |
941 | 941 |
942 } // namespace viz | 942 } // namespace viz |
OLD | NEW |