OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/tiles/software_image_decode_controller.h" | 5 #include "cc/tiles/software_image_decode_controller.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <functional> | 10 #include <functional> |
11 | 11 |
12 #include "base/format_macros.h" | 12 #include "base/format_macros.h" |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "base/memory/discardable_memory.h" | 14 #include "base/memory/discardable_memory.h" |
15 #include "base/memory/ptr_util.h" | 15 #include "base/memory/ptr_util.h" |
16 #include "base/metrics/histogram_macros.h" | 16 #include "base/metrics/histogram_macros.h" |
17 #include "base/strings/stringprintf.h" | 17 #include "base/strings/stringprintf.h" |
18 #include "base/thread_task_runner_handle.h" | 18 #include "base/threading/thread_task_runner_handle.h" |
19 #include "base/trace_event/memory_dump_manager.h" | 19 #include "base/trace_event/memory_dump_manager.h" |
20 #include "cc/debug/devtools_instrumentation.h" | 20 #include "cc/debug/devtools_instrumentation.h" |
21 #include "cc/raster/tile_task.h" | 21 #include "cc/raster/tile_task.h" |
22 #include "third_party/skia/include/core/SkCanvas.h" | 22 #include "third_party/skia/include/core/SkCanvas.h" |
23 #include "third_party/skia/include/core/SkImage.h" | 23 #include "third_party/skia/include/core/SkImage.h" |
24 #include "third_party/skia/include/core/SkPixmap.h" | 24 #include "third_party/skia/include/core/SkPixmap.h" |
25 #include "ui/gfx/skia_util.h" | 25 #include "ui/gfx/skia_util.h" |
26 | 26 |
27 namespace cc { | 27 namespace cc { |
28 namespace { | 28 namespace { |
(...skipping 942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
971 void SoftwareImageDecodeController::MemoryBudget::ResetUsage() { | 971 void SoftwareImageDecodeController::MemoryBudget::ResetUsage() { |
972 current_usage_bytes_ = 0; | 972 current_usage_bytes_ = 0; |
973 } | 973 } |
974 | 974 |
975 size_t SoftwareImageDecodeController::MemoryBudget::GetCurrentUsageSafe() | 975 size_t SoftwareImageDecodeController::MemoryBudget::GetCurrentUsageSafe() |
976 const { | 976 const { |
977 return current_usage_bytes_.ValueOrDie(); | 977 return current_usage_bytes_.ValueOrDie(); |
978 } | 978 } |
979 | 979 |
980 } // namespace cc | 980 } // namespace cc |
OLD | NEW |