| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #ifndef GPU_COMMAND_BUFFER_SERVICE_PROGRAM_CACHE_LRU_HELPER_H_ | 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_PROGRAM_CACHE_LRU_HELPER_H_ |
| 6 #define GPU_COMMAND_BUFFER_SERVICE_PROGRAM_CACHE_LRU_HELPER_H_ | 6 #define GPU_COMMAND_BUFFER_SERVICE_PROGRAM_CACHE_LRU_HELPER_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/hash_tables.h" | 12 #include "base/containers/hash_tables.h" |
| 13 #include "gpu/gpu_export.h" | 13 #include "gpu/gpu_export.h" |
| 14 | 14 |
| 15 namespace gpu { | 15 namespace gpu { |
| 16 namespace gles2 { | 16 namespace gles2 { |
| 17 | 17 |
| 18 // LRU helper for the program cache, operates in O(1) time. | 18 // LRU helper for the program cache, operates in O(1) time. |
| 19 // This class uses a linked list with a hash map. Both copy their string keys, | 19 // This class uses a linked list with a hash map. Both copy their string keys, |
| 20 // so be mindful that keys you insert will be stored again twice in memory. | 20 // so be mindful that keys you insert will be stored again twice in memory. |
| 21 class GPU_EXPORT ProgramCacheLruHelper { | 21 class GPU_EXPORT ProgramCacheLruHelper { |
| 22 public: | 22 public: |
| (...skipping 19 matching lines...) Expand all Loading... |
| 42 StringList queue; | 42 StringList queue; |
| 43 IteratorMap location_map; | 43 IteratorMap location_map; |
| 44 | 44 |
| 45 DISALLOW_COPY_AND_ASSIGN(ProgramCacheLruHelper); | 45 DISALLOW_COPY_AND_ASSIGN(ProgramCacheLruHelper); |
| 46 }; | 46 }; |
| 47 | 47 |
| 48 } // namespace gles2 | 48 } // namespace gles2 |
| 49 } // namespace gpu | 49 } // namespace gpu |
| 50 | 50 |
| 51 #endif // GPU_COMMAND_BUFFER_SERVICE_PROGRAM_CACHE_LRU_HELPER_H_ | 51 #endif // GPU_COMMAND_BUFFER_SERVICE_PROGRAM_CACHE_LRU_HELPER_H_ |
| OLD | NEW |