OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CCTextureUpdateQueue_h | |
6 #define CCTextureUpdateQueue_h | |
7 | |
8 #include "base/basictypes.h" | |
9 #include "cc/resource_update.h" | |
10 #include "cc/texture_copier.h" | |
11 #include <deque> | |
12 | |
13 namespace cc { | |
14 | |
15 class TextureUpdateQueue { | |
16 public: | |
17 TextureUpdateQueue(); | |
18 virtual ~TextureUpdateQueue(); | |
19 | |
20 void appendFullUpload(const ResourceUpdate&); | |
21 void appendPartialUpload(const ResourceUpdate&); | |
22 void appendCopy(TextureCopier::Parameters); | |
23 | |
24 void clearUploadsToEvictedResources(); | |
25 | |
26 ResourceUpdate takeFirstFullUpload(); | |
27 ResourceUpdate takeFirstPartialUpload(); | |
28 TextureCopier::Parameters takeFirstCopy(); | |
29 | |
30 size_t fullUploadSize() const { return m_fullEntries.size(); } | |
31 size_t partialUploadSize() const { return m_partialEntries.size(); } | |
32 size_t copySize() const { return m_copyEntries.size(); } | |
33 | |
34 bool hasMoreUpdates() const; | |
35 | |
36 private: | |
37 void clearUploadsToEvictedResources(std::deque<ResourceUpdate>& entryQueue); | |
38 std::deque<ResourceUpdate> m_fullEntries; | |
39 std::deque<ResourceUpdate> m_partialEntries; | |
40 std::deque<TextureCopier::Parameters> m_copyEntries; | |
41 | |
42 DISALLOW_COPY_AND_ASSIGN(TextureUpdateQueue); | |
43 }; | |
44 | |
45 } | |
46 | |
47 #endif // CCTextureUpdateQueue_h | |
OLD | NEW |