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 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
753 for (const auto& surface_id : frame.metadata.referenced_surfaces) { | 753 for (const auto& surface_id : frame.metadata.referenced_surfaces) { |
754 if (!contained_surfaces_.count(surface_id)) { | 754 if (!contained_surfaces_.count(surface_id)) { |
755 result->undrawn_surfaces.insert(surface_id); | 755 result->undrawn_surfaces.insert(surface_id); |
756 PrewalkTree(surface_id, false, 0, result); | 756 PrewalkTree(surface_id, false, 0, result); |
757 } | 757 } |
758 } | 758 } |
759 | 759 |
760 CHECK(debug_weak_this.get()); | 760 CHECK(debug_weak_this.get()); |
761 // TODO(staraz): It shouldn't need to call the callback when the damage is | 761 // TODO(staraz): It shouldn't need to call the callback when the damage is |
762 // from |surface| and not from |child_surfaces|. | 762 // from |surface| and not from |child_surfaces|. |
763 if (!damage_rect.IsEmpty()) | 763 if (!damage_rect.IsEmpty()) { |
764 surface->RunWillDrawCallback(damage_rect); | 764 surface->RunWillDrawCallback(damage_rect); |
| 765 manager_->SurfaceWillDraw(surface->surface_id()); |
| 766 } |
765 | 767 |
766 CHECK(debug_weak_this.get()); | 768 CHECK(debug_weak_this.get()); |
767 for (const auto& render_pass : frame.render_pass_list) { | 769 for (const auto& render_pass : frame.render_pass_list) { |
768 if (!render_pass->copy_requests.empty()) { | 770 if (!render_pass->copy_requests.empty()) { |
769 int remapped_pass_id = RemapPassId(render_pass->id, surface_id); | 771 int remapped_pass_id = RemapPassId(render_pass->id, surface_id); |
770 copy_request_passes_.insert(remapped_pass_id); | 772 copy_request_passes_.insert(remapped_pass_id); |
771 } | 773 } |
772 } | 774 } |
773 | 775 |
774 referenced_surfaces_.erase(referenced_surfaces_.find(surface->surface_id())); | 776 referenced_surfaces_.erase(referenced_surfaces_.find(surface->surface_id())); |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
930 } | 932 } |
931 | 933 |
932 void SurfaceAggregator::SetOutputColorSpace( | 934 void SurfaceAggregator::SetOutputColorSpace( |
933 const gfx::ColorSpace& blending_color_space, | 935 const gfx::ColorSpace& blending_color_space, |
934 const gfx::ColorSpace& output_color_space) { | 936 const gfx::ColorSpace& output_color_space) { |
935 blending_color_space_ = blending_color_space; | 937 blending_color_space_ = blending_color_space; |
936 output_color_space_ = output_color_space; | 938 output_color_space_ = output_color_space; |
937 } | 939 } |
938 | 940 |
939 } // namespace cc | 941 } // namespace cc |
OLD | NEW |