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 667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
678 | 678 |
679 CHECK(debug_weak_this.get()); | 679 CHECK(debug_weak_this.get()); |
680 for (const auto& surface_id : surface_frame.metadata.referenced_surfaces) { | 680 for (const auto& surface_id : surface_frame.metadata.referenced_surfaces) { |
681 if (!contained_surfaces_.count(surface_id)) { | 681 if (!contained_surfaces_.count(surface_id)) { |
682 result->undrawn_surfaces.insert(surface_id); | 682 result->undrawn_surfaces.insert(surface_id); |
683 PrewalkTree(surface_id, false, RenderPassId(), result); | 683 PrewalkTree(surface_id, false, RenderPassId(), result); |
684 } | 684 } |
685 } | 685 } |
686 | 686 |
687 CHECK(debug_weak_this.get()); | 687 CHECK(debug_weak_this.get()); |
688 if (surface->factory()) | 688 if (surface->factory()) { |
689 surface->factory()->WillDrawSurface(surface->surface_id(), damage_rect); | 689 surface->factory()->WillDrawSurface(surface->surface_id().local_frame_id(), |
| 690 damage_rect); |
| 691 } |
690 | 692 |
691 CHECK(debug_weak_this.get()); | 693 CHECK(debug_weak_this.get()); |
692 for (const auto& render_pass : frame_data->render_pass_list) { | 694 for (const auto& render_pass : frame_data->render_pass_list) { |
693 if (!render_pass->copy_requests.empty()) { | 695 if (!render_pass->copy_requests.empty()) { |
694 RenderPassId remapped_pass_id = RemapPassId(render_pass->id, surface_id); | 696 RenderPassId remapped_pass_id = RemapPassId(render_pass->id, surface_id); |
695 copy_request_passes_.insert(remapped_pass_id); | 697 copy_request_passes_.insert(remapped_pass_id); |
696 } | 698 } |
697 } | 699 } |
698 | 700 |
699 referenced_surfaces_.erase(it); | 701 referenced_surfaces_.erase(it); |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
829 | 831 |
830 void SurfaceAggregator::SetFullDamageForSurface(const SurfaceId& surface_id) { | 832 void SurfaceAggregator::SetFullDamageForSurface(const SurfaceId& surface_id) { |
831 auto it = previous_contained_surfaces_.find(surface_id); | 833 auto it = previous_contained_surfaces_.find(surface_id); |
832 if (it == previous_contained_surfaces_.end()) | 834 if (it == previous_contained_surfaces_.end()) |
833 return; | 835 return; |
834 // Set the last drawn index as 0 to ensure full damage next time it's drawn. | 836 // Set the last drawn index as 0 to ensure full damage next time it's drawn. |
835 it->second = 0; | 837 it->second = 0; |
836 } | 838 } |
837 | 839 |
838 } // namespace cc | 840 } // namespace cc |
OLD | NEW |