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 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
527 SurfaceToResourceChildIdMap::iterator it = | 527 SurfaceToResourceChildIdMap::iterator it = |
528 surface_id_to_resource_child_id_.find(surface.first); | 528 surface_id_to_resource_child_id_.find(surface.first); |
529 if (it != surface_id_to_resource_child_id_.end()) { | 529 if (it != surface_id_to_resource_child_id_.end()) { |
530 provider_->DestroyChild(it->second); | 530 provider_->DestroyChild(it->second); |
531 surface_id_to_resource_child_id_.erase(it); | 531 surface_id_to_resource_child_id_.erase(it); |
532 } | 532 } |
533 | 533 |
534 // Notify client of removed surface. | 534 // Notify client of removed surface. |
535 Surface* surface_ptr = manager_->GetSurfaceForId(surface.first); | 535 Surface* surface_ptr = manager_->GetSurfaceForId(surface.first); |
536 if (surface_ptr) { | 536 if (surface_ptr) { |
537 surface_ptr->RunDrawCallbacks(SurfaceDrawStatus::DRAW_SKIPPED); | 537 surface_ptr->RunDrawCallbacks(); |
538 } | 538 } |
539 } | 539 } |
540 } | 540 } |
541 } | 541 } |
542 | 542 |
543 // Walk the Surface tree from surface_id. Validate the resources of the current | 543 // Walk the Surface tree from surface_id. Validate the resources of the current |
544 // surface and its descendants, check if there are any copy requests, and | 544 // surface and its descendants, check if there are any copy requests, and |
545 // return the combined damage rect. | 545 // return the combined damage rect. |
546 gfx::Rect SurfaceAggregator::PrewalkTree(const SurfaceId& surface_id, | 546 gfx::Rect SurfaceAggregator::PrewalkTree(const SurfaceId& surface_id, |
547 bool in_moved_pixel_pass, | 547 bool in_moved_pixel_pass, |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
831 | 831 |
832 void SurfaceAggregator::SetFullDamageForSurface(const SurfaceId& surface_id) { | 832 void SurfaceAggregator::SetFullDamageForSurface(const SurfaceId& surface_id) { |
833 auto it = previous_contained_surfaces_.find(surface_id); | 833 auto it = previous_contained_surfaces_.find(surface_id); |
834 if (it == previous_contained_surfaces_.end()) | 834 if (it == previous_contained_surfaces_.end()) |
835 return; | 835 return; |
836 // 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. |
837 it->second = 0; | 837 it->second = 0; |
838 } | 838 } |
839 | 839 |
840 } // namespace cc | 840 } // namespace cc |
OLD | NEW |