OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 25 matching lines...) Expand all Loading... |
36 class CCTextureUpdateQueue { | 36 class CCTextureUpdateQueue { |
37 WTF_MAKE_NONCOPYABLE(CCTextureUpdateQueue); | 37 WTF_MAKE_NONCOPYABLE(CCTextureUpdateQueue); |
38 public: | 38 public: |
39 CCTextureUpdateQueue(); | 39 CCTextureUpdateQueue(); |
40 virtual ~CCTextureUpdateQueue(); | 40 virtual ~CCTextureUpdateQueue(); |
41 | 41 |
42 void appendFullUpload(TextureUploader::Parameters); | 42 void appendFullUpload(TextureUploader::Parameters); |
43 void appendPartialUpload(TextureUploader::Parameters); | 43 void appendPartialUpload(TextureUploader::Parameters); |
44 void appendCopy(TextureCopier::Parameters); | 44 void appendCopy(TextureCopier::Parameters); |
45 | 45 |
| 46 void clearUploads(); |
| 47 |
46 TextureUploader::Parameters takeFirstFullUpload(); | 48 TextureUploader::Parameters takeFirstFullUpload(); |
47 TextureUploader::Parameters takeFirstPartialUpload(); | 49 TextureUploader::Parameters takeFirstPartialUpload(); |
48 TextureCopier::Parameters takeFirstCopy(); | 50 TextureCopier::Parameters takeFirstCopy(); |
49 | 51 |
50 size_t fullUploadSize() const { return m_fullEntries.size(); } | 52 size_t fullUploadSize() const { return m_fullEntries.size(); } |
51 size_t partialUploadSize() const { return m_partialEntries.size(); } | 53 size_t partialUploadSize() const { return m_partialEntries.size(); } |
52 size_t copySize() const { return m_copyEntries.size(); } | 54 size_t copySize() const { return m_copyEntries.size(); } |
53 | 55 |
54 bool hasMoreUpdates() const; | 56 bool hasMoreUpdates() const; |
55 | 57 |
56 private: | 58 private: |
57 Deque<TextureUploader::Parameters> m_fullEntries; | 59 Deque<TextureUploader::Parameters> m_fullEntries; |
58 Deque<TextureUploader::Parameters> m_partialEntries; | 60 Deque<TextureUploader::Parameters> m_partialEntries; |
59 Deque<TextureCopier::Parameters> m_copyEntries; | 61 Deque<TextureCopier::Parameters> m_copyEntries; |
60 }; | 62 }; |
61 | 63 |
62 } | 64 } |
63 | 65 |
64 #endif // CCTextureUpdateQueue_h | 66 #endif // CCTextureUpdateQueue_h |
OLD | NEW |