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

Side by Side Diff: cc/resources/resource_pool.h

Issue 1151573004: Use a deque in ResourcePool instead of a list. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: deque: rebase Created 5 years, 6 months 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 CC_RESOURCES_RESOURCE_POOL_H_ 5 #ifndef CC_RESOURCES_RESOURCE_POOL_H_
6 #define CC_RESOURCES_RESOURCE_POOL_H_ 6 #define CC_RESOURCES_RESOURCE_POOL_H_
7 7
8 #include <list> 8 #include <deque>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "cc/base/cc_export.h" 11 #include "cc/base/cc_export.h"
12 #include "cc/output/renderer.h" 12 #include "cc/output/renderer.h"
13 #include "cc/resources/resource.h" 13 #include "cc/resources/resource.h"
14 #include "cc/resources/resource_format.h" 14 #include "cc/resources/resource_format.h"
15 15
16 namespace cc { 16 namespace cc {
17 class ScopedResource; 17 class ScopedResource;
18 18
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 size_t memory_usage_bytes_; 67 size_t memory_usage_bytes_;
68 size_t unused_memory_usage_bytes_; 68 size_t unused_memory_usage_bytes_;
69 size_t resource_count_; 69 size_t resource_count_;
70 70
71 struct PoolResource { 71 struct PoolResource {
72 PoolResource(ScopedResource* resource, uint64_t content_id) 72 PoolResource(ScopedResource* resource, uint64_t content_id)
73 : resource(resource), content_id(content_id) {} 73 : resource(resource), content_id(content_id) {}
74 ScopedResource* resource; 74 ScopedResource* resource;
75 uint64_t content_id; 75 uint64_t content_id;
76 }; 76 };
77 typedef std::list<PoolResource> ResourceList; 77 typedef std::deque<PoolResource> ResourceList;
78 ResourceList unused_resources_; 78 ResourceList unused_resources_;
79 ResourceList busy_resources_; 79 ResourceList busy_resources_;
80 80
81 DISALLOW_COPY_AND_ASSIGN(ResourcePool); 81 DISALLOW_COPY_AND_ASSIGN(ResourcePool);
82 }; 82 };
83 83
84 } // namespace cc 84 } // namespace cc
85 85
86 #endif // CC_RESOURCES_RESOURCE_POOL_H_ 86 #endif // CC_RESOURCES_RESOURCE_POOL_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698