OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/resources/resource_pool.h" | 5 #include "cc/resources/resource_pool.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
11 #include <utility> | 11 #include <utility> |
12 | 12 |
13 #include "base/format_macros.h" | 13 #include "base/format_macros.h" |
14 #include "base/strings/stringprintf.h" | 14 #include "base/strings/stringprintf.h" |
15 #include "base/thread_task_runner_handle.h" | 15 #include "base/threading/thread_task_runner_handle.h" |
16 #include "base/trace_event/memory_dump_manager.h" | 16 #include "base/trace_event/memory_dump_manager.h" |
17 #include "cc/base/container_util.h" | 17 #include "cc/base/container_util.h" |
18 #include "cc/resources/resource_provider.h" | 18 #include "cc/resources/resource_provider.h" |
19 #include "cc/resources/resource_util.h" | 19 #include "cc/resources/resource_util.h" |
20 #include "cc/resources/scoped_resource.h" | 20 #include "cc/resources/scoped_resource.h" |
21 | 21 |
22 namespace cc { | 22 namespace cc { |
23 namespace { | 23 namespace { |
24 | 24 |
25 // Delay before a resource is considered expired. | 25 // Delay before a resource is considered expired. |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 for (const auto& resource : busy_resources_) { | 358 for (const auto& resource : busy_resources_) { |
359 resource->OnMemoryDump(pmd, resource_provider_, false /* is_free */); | 359 resource->OnMemoryDump(pmd, resource_provider_, false /* is_free */); |
360 } | 360 } |
361 for (const auto& entry : in_use_resources_) { | 361 for (const auto& entry : in_use_resources_) { |
362 entry.second->OnMemoryDump(pmd, resource_provider_, false /* is_free */); | 362 entry.second->OnMemoryDump(pmd, resource_provider_, false /* is_free */); |
363 } | 363 } |
364 return true; | 364 return true; |
365 } | 365 } |
366 | 366 |
367 } // namespace cc | 367 } // namespace cc |
OLD | NEW |