OLD | NEW |
---|---|
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_UPDATE_QUEUE_H_ | 5 #ifndef CC_RESOURCES_RESOURCE_UPDATE_QUEUE_H_ |
6 #define CC_RESOURCES_RESOURCE_UPDATE_QUEUE_H_ | 6 #define CC_RESOURCES_RESOURCE_UPDATE_QUEUE_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "cc/base/cc_export.h" | 10 #include "cc/base/cc_export.h" |
11 #include "cc/output/texture_copier.h" | 11 #include "cc/output/texture_copier.h" |
12 #include "cc/resources/resource_update.h" | 12 #include "cc/resources/resource_update.h" |
13 | 13 |
14 namespace cc { | 14 namespace cc { |
15 | 15 |
16 class CC_EXPORT ResourceUpdateQueue { | 16 class CC_EXPORT ResourceUpdateQueue { |
17 public: | 17 public: |
18 ResourceUpdateQueue(); | 18 ResourceUpdateQueue(); |
19 virtual ~ResourceUpdateQueue(); | 19 virtual ~ResourceUpdateQueue(); |
20 | 20 |
21 void appendFullUpload(const ResourceUpdate&); | 21 void AppendFullUpload(const ResourceUpdate& FIXMENAME); |
22 void appendPartialUpload(const ResourceUpdate&); | 22 void AppendPartialUpload(const ResourceUpdate& FIXMENAME); |
23 void appendCopy(TextureCopier::Parameters); | 23 void AppendCopy(TextureCopier::Parameters FIXMENAME); |
jamesr
2013/03/20 19:59:30
FIXMENAME
alexst (slow to review)
2013/03/20 20:10:38
OKAY :)
| |
24 | 24 |
25 void clearUploadsToEvictedResources(); | 25 void ClearUploadsToEvictedResources(); |
26 | 26 |
27 ResourceUpdate takeFirstFullUpload(); | 27 ResourceUpdate TakeFirstFullUpload(); |
28 ResourceUpdate takeFirstPartialUpload(); | 28 ResourceUpdate TakeFirstPartialUpload(); |
29 TextureCopier::Parameters takeFirstCopy(); | 29 TextureCopier::Parameters TakeFirstCopy(); |
30 | 30 |
31 size_t fullUploadSize() const { return m_fullEntries.size(); } | 31 size_t FullUploadSize() const { return full_entries_.size(); } |
32 size_t partialUploadSize() const { return m_partialEntries.size(); } | 32 size_t PartialUploadSize() const { return partial_entries_.size(); } |
33 size_t copySize() const { return m_copyEntries.size(); } | 33 size_t CopySize() const { return copy_entries_.size(); } |
34 | 34 |
35 bool hasMoreUpdates() const; | 35 bool HasMoreUpdates() const; |
36 | 36 |
37 private: | 37 private: |
38 void clearUploadsToEvictedResources(std::deque<ResourceUpdate>& entryQueue); | 38 void ClearUploadsToEvictedResources(std::deque<ResourceUpdate>* entry_queue); |
39 std::deque<ResourceUpdate> m_fullEntries; | 39 std::deque<ResourceUpdate> full_entries_; |
40 std::deque<ResourceUpdate> m_partialEntries; | 40 std::deque<ResourceUpdate> partial_entries_; |
41 std::deque<TextureCopier::Parameters> m_copyEntries; | 41 std::deque<TextureCopier::Parameters> copy_entries_; |
42 | 42 |
43 DISALLOW_COPY_AND_ASSIGN(ResourceUpdateQueue); | 43 DISALLOW_COPY_AND_ASSIGN(ResourceUpdateQueue); |
44 }; | 44 }; |
45 | 45 |
46 } | 46 } |
47 | 47 |
48 #endif // CC_RESOURCES_RESOURCE_UPDATE_QUEUE_H_ | 48 #endif // CC_RESOURCES_RESOURCE_UPDATE_QUEUE_H_ |
OLD | NEW |