OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef CC_TILES_GPU_IMAGE_DECODE_CACHE_H_ | 5 #ifndef CC_TILES_GPU_IMAGE_DECODE_CACHE_H_ |
6 #define CC_TILES_GPU_IMAGE_DECODE_CACHE_H_ | 6 #define CC_TILES_GPU_IMAGE_DECODE_CACHE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <unordered_map> | 9 #include <unordered_map> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/containers/mru_cache.h" | 12 #include "base/containers/mru_cache.h" |
13 #include "base/memory/discardable_memory.h" | 13 #include "base/memory/discardable_memory.h" |
14 #include "base/memory/memory_coordinator_client.h" | 14 #include "base/memory/memory_coordinator_client.h" |
15 #include "base/synchronization/lock.h" | 15 #include "base/synchronization/lock.h" |
16 #include "base/trace_event/memory_dump_provider.h" | 16 #include "base/trace_event/memory_dump_provider.h" |
17 #include "cc/base/cc_export.h" | 17 #include "cc/cc_export.h" |
18 #include "cc/resources/resource_format.h" | 18 #include "cc/resources/resource_format.h" |
19 #include "cc/tiles/image_decode_cache.h" | 19 #include "cc/tiles/image_decode_cache.h" |
20 #include "third_party/skia/include/core/SkRefCnt.h" | 20 #include "third_party/skia/include/core/SkRefCnt.h" |
21 | 21 |
22 namespace cc { | 22 namespace cc { |
23 | 23 |
24 class ContextProvider; | 24 class ContextProvider; |
25 | 25 |
26 // OVERVIEW: | 26 // OVERVIEW: |
27 // | 27 // |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 | 344 |
345 // We can't release GPU backed SkImages without holding the context lock, | 345 // We can't release GPU backed SkImages without holding the context lock, |
346 // so we add them to this list and defer deletion until the next time the lock | 346 // so we add them to this list and defer deletion until the next time the lock |
347 // is held. | 347 // is held. |
348 std::vector<sk_sp<SkImage>> images_pending_deletion_; | 348 std::vector<sk_sp<SkImage>> images_pending_deletion_; |
349 }; | 349 }; |
350 | 350 |
351 } // namespace cc | 351 } // namespace cc |
352 | 352 |
353 #endif // CC_TILES_GPU_IMAGE_DECODE_CACHE_H_ | 353 #endif // CC_TILES_GPU_IMAGE_DECODE_CACHE_H_ |
OLD | NEW |