OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 CONTENT_BROWSER_GPU_SHADER_DISK_CACHE_H_ | 5 #ifndef CONTENT_BROWSER_GPU_SHADER_DISK_CACHE_H_ |
6 #define CONTENT_BROWSER_GPU_SHADER_DISK_CACHE_H_ | 6 #define CONTENT_BROWSER_GPU_SHADER_DISK_CACHE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 void EntryComplete(void* entry); | 83 void EntryComplete(void* entry); |
84 void ReadComplete(); | 84 void ReadComplete(); |
85 | 85 |
86 bool cache_available_; | 86 bool cache_available_; |
87 int host_id_; | 87 int host_id_; |
88 base::FilePath cache_path_; | 88 base::FilePath cache_path_; |
89 bool is_initialized_; | 89 bool is_initialized_; |
90 net::CompletionCallback available_callback_; | 90 net::CompletionCallback available_callback_; |
91 net::CompletionCallback cache_complete_callback_; | 91 net::CompletionCallback cache_complete_callback_; |
92 | 92 |
93 scoped_ptr<disk_cache::Backend> backend_; | 93 std::unique_ptr<disk_cache::Backend> backend_; |
94 | 94 |
95 scoped_refptr<ShaderDiskReadHelper> helper_; | 95 scoped_refptr<ShaderDiskReadHelper> helper_; |
96 std::map<void*, scoped_refptr<ShaderDiskCacheEntry> > entry_map_; | 96 std::map<void*, scoped_refptr<ShaderDiskCacheEntry> > entry_map_; |
97 | 97 |
98 DISALLOW_COPY_AND_ASSIGN(ShaderDiskCache); | 98 DISALLOW_COPY_AND_ASSIGN(ShaderDiskCache); |
99 }; | 99 }; |
100 | 100 |
101 // ShaderCacheFactory maintains a cache of ShaderDiskCache objects | 101 // ShaderCacheFactory maintains a cache of ShaderDiskCache objects |
102 // so we only create one per profile directory. | 102 // so we only create one per profile directory. |
103 class CONTENT_EXPORT ShaderCacheFactory { | 103 class CONTENT_EXPORT ShaderCacheFactory { |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 typedef std::map<base::FilePath, ShaderClearQueue> ShaderClearMap; | 148 typedef std::map<base::FilePath, ShaderClearQueue> ShaderClearMap; |
149 ShaderClearMap shader_clear_map_; | 149 ShaderClearMap shader_clear_map_; |
150 | 150 |
151 DISALLOW_COPY_AND_ASSIGN(ShaderCacheFactory); | 151 DISALLOW_COPY_AND_ASSIGN(ShaderCacheFactory); |
152 }; | 152 }; |
153 | 153 |
154 } // namespace content | 154 } // namespace content |
155 | 155 |
156 #endif // CONTENT_BROWSER_GPU_SHADER_DISK_CACHE_H_ | 156 #endif // CONTENT_BROWSER_GPU_SHADER_DISK_CACHE_H_ |
157 | 157 |
OLD | NEW |