| 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 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 680 CHECK(debug_weak_this.get()); | 680 CHECK(debug_weak_this.get()); |
| 681 for (const auto& surface_id : frame.metadata.referenced_surfaces) { | 681 for (const auto& surface_id : frame.metadata.referenced_surfaces) { |
| 682 if (!contained_surfaces_.count(surface_id)) { | 682 if (!contained_surfaces_.count(surface_id)) { |
| 683 result->undrawn_surfaces.insert(surface_id); | 683 result->undrawn_surfaces.insert(surface_id); |
| 684 PrewalkTree(surface_id, false, 0, result); | 684 PrewalkTree(surface_id, false, 0, result); |
| 685 } | 685 } |
| 686 } | 686 } |
| 687 | 687 |
| 688 CHECK(debug_weak_this.get()); | 688 CHECK(debug_weak_this.get()); |
| 689 if (surface->factory()) { | 689 if (surface->factory()) { |
| 690 surface->factory()->WillDrawSurface(surface->surface_id().local_frame_id(), | 690 surface->factory()->WillDrawSurface( |
| 691 damage_rect); | 691 surface->surface_id().local_surface_id(), damage_rect); |
| 692 } | 692 } |
| 693 | 693 |
| 694 CHECK(debug_weak_this.get()); | 694 CHECK(debug_weak_this.get()); |
| 695 for (const auto& render_pass : frame.render_pass_list) { | 695 for (const auto& render_pass : frame.render_pass_list) { |
| 696 if (!render_pass->copy_requests.empty()) { | 696 if (!render_pass->copy_requests.empty()) { |
| 697 int remapped_pass_id = RemapPassId(render_pass->id, surface_id); | 697 int remapped_pass_id = RemapPassId(render_pass->id, surface_id); |
| 698 copy_request_passes_.insert(remapped_pass_id); | 698 copy_request_passes_.insert(remapped_pass_id); |
| 699 } | 699 } |
| 700 } | 700 } |
| 701 | 701 |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 842 | 842 |
| 843 void SurfaceAggregator::SetFullDamageForSurface(const SurfaceId& surface_id) { | 843 void SurfaceAggregator::SetFullDamageForSurface(const SurfaceId& surface_id) { |
| 844 auto it = previous_contained_surfaces_.find(surface_id); | 844 auto it = previous_contained_surfaces_.find(surface_id); |
| 845 if (it == previous_contained_surfaces_.end()) | 845 if (it == previous_contained_surfaces_.end()) |
| 846 return; | 846 return; |
| 847 // Set the last drawn index as 0 to ensure full damage next time it's drawn. | 847 // Set the last drawn index as 0 to ensure full damage next time it's drawn. |
| 848 it->second = 0; | 848 it->second = 0; |
| 849 } | 849 } |
| 850 | 850 |
| 851 } // namespace cc | 851 } // namespace cc |
| OLD | NEW |