| 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 |
| 11 #include "base/bind.h" | 11 #include "base/bind.h" |
| 12 #include "base/containers/adapters.h" | 12 #include "base/containers/adapters.h" |
| 13 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "base/memory/ptr_util.h" | 15 #include "base/memory/ptr_util.h" |
| 16 #include "base/stl_util.h" | 16 #include "base/stl_util.h" |
| 17 #include "base/trace_event/trace_event.h" | 17 #include "base/trace_event/trace_event.h" |
| 18 #include "cc/base/math_util.h" | 18 #include "cc/base/math_util.h" |
| 19 #include "cc/output/compositor_frame.h" | 19 #include "cc/output/compositor_frame.h" |
| 20 #include "cc/output/delegated_frame_data.h" | 20 #include "cc/output/delegated_frame_data.h" |
| 21 #include "cc/quads/draw_quad.h" | 21 #include "cc/quads/draw_quad.h" |
| 22 #include "cc/quads/render_pass_draw_quad.h" | 22 #include "cc/quads/render_pass_draw_quad.h" |
| 23 #include "cc/quads/shared_quad_state.h" | 23 #include "cc/quads/shared_quad_state.h" |
| 24 #include "cc/quads/solid_color_draw_quad.h" | 24 #include "cc/quads/solid_color_draw_quad.h" |
| 25 #include "cc/quads/surface_draw_quad.h" | 25 #include "cc/quads/surface_draw_quad.h" |
| 26 #include "cc/quads/texture_draw_quad.h" | 26 #include "cc/quads/texture_draw_quad.h" |
| 27 #include "cc/resources/resource_provider.h" |
| 27 #include "cc/surfaces/surface.h" | 28 #include "cc/surfaces/surface.h" |
| 28 #include "cc/surfaces/surface_factory.h" | 29 #include "cc/surfaces/surface_factory.h" |
| 29 #include "cc/surfaces/surface_manager.h" | 30 #include "cc/surfaces/surface_manager.h" |
| 30 #include "cc/trees/blocking_task_runner.h" | 31 #include "cc/trees/blocking_task_runner.h" |
| 31 | 32 |
| 32 namespace cc { | 33 namespace cc { |
| 33 namespace { | 34 namespace { |
| 34 | 35 |
| 35 void MoveMatchingRequests( | 36 void MoveMatchingRequests( |
| 36 RenderPassId id, | 37 RenderPassId id, |
| (...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 834 | 835 |
| 835 void SurfaceAggregator::SetFullDamageForSurface(const SurfaceId& surface_id) { | 836 void SurfaceAggregator::SetFullDamageForSurface(const SurfaceId& surface_id) { |
| 836 auto it = previous_contained_surfaces_.find(surface_id); | 837 auto it = previous_contained_surfaces_.find(surface_id); |
| 837 if (it == previous_contained_surfaces_.end()) | 838 if (it == previous_contained_surfaces_.end()) |
| 838 return; | 839 return; |
| 839 // Set the last drawn index as 0 to ensure full damage next time it's drawn. | 840 // Set the last drawn index as 0 to ensure full damage next time it's drawn. |
| 840 it->second = 0; | 841 it->second = 0; |
| 841 } | 842 } |
| 842 | 843 |
| 843 } // namespace cc | 844 } // namespace cc |
| OLD | NEW |