Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(716)

Side by Side Diff: content/browser/gpu/shader_disk_cache.h

Issue 2469413002: gpu shader cache: Make ShaderClearHelper non-refcounted. (Closed)
Patch Set: update map before Clear() Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/gpu/shader_disk_cache.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 ~ShaderCacheFactory(); 148 ~ShaderCacheFactory();
149 149
150 static void CreateFactoryInstance( 150 static void CreateFactoryInstance(
151 scoped_refptr<base::SingleThreadTaskRunner> cache_task_runner); 151 scoped_refptr<base::SingleThreadTaskRunner> cache_task_runner);
152 152
153 scoped_refptr<base::SingleThreadTaskRunner> cache_task_runner_; 153 scoped_refptr<base::SingleThreadTaskRunner> cache_task_runner_;
154 154
155 scoped_refptr<ShaderDiskCache> GetByPath(const base::FilePath& path); 155 scoped_refptr<ShaderDiskCache> GetByPath(const base::FilePath& path);
156 void CacheCleared(const base::FilePath& path); 156 void CacheCleared(const base::FilePath& path);
157 157
158 typedef std::map<base::FilePath, ShaderDiskCache*> ShaderCacheMap; 158 using ShaderCacheMap = std::map<base::FilePath, ShaderDiskCache*>;
159 ShaderCacheMap shader_cache_map_; 159 ShaderCacheMap shader_cache_map_;
160 160
161 typedef std::map<int32_t, base::FilePath> ClientIdToPathMap; 161 using ClientIdToPathMap = std::map<int32_t, base::FilePath>;
162 ClientIdToPathMap client_id_to_path_map_; 162 ClientIdToPathMap client_id_to_path_map_;
163 163
164 typedef std::queue<scoped_refptr<ShaderClearHelper> > ShaderClearQueue; 164 using ShaderClearQueue = std::queue<std::unique_ptr<ShaderClearHelper>>;
165 typedef std::map<base::FilePath, ShaderClearQueue> ShaderClearMap; 165 using ShaderClearMap = std::map<base::FilePath, ShaderClearQueue>;
166 ShaderClearMap shader_clear_map_; 166 ShaderClearMap shader_clear_map_;
167 167
168 DISALLOW_COPY_AND_ASSIGN(ShaderCacheFactory); 168 DISALLOW_COPY_AND_ASSIGN(ShaderCacheFactory);
169 }; 169 };
170 170
171 } // namespace content 171 } // namespace content
172 172
173 #endif // CONTENT_BROWSER_GPU_SHADER_DISK_CACHE_H_ 173 #endif // CONTENT_BROWSER_GPU_SHADER_DISK_CACHE_H_
174 174
OLDNEW
« no previous file with comments | « no previous file | content/browser/gpu/shader_disk_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698