Revert 279472 "Mojo: Add mojo_shell_tests to the Linux bots."
[chromium-blink-merge.git] / cc / resources / resource_update_queue.h
blobde455ce43fe62d5ac6a3ac2018f7311e5f6354d2
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.
5 #ifndef CC_RESOURCES_RESOURCE_UPDATE_QUEUE_H_
6 #define CC_RESOURCES_RESOURCE_UPDATE_QUEUE_H_
8 #include <deque>
9 #include "base/basictypes.h"
10 #include "cc/base/cc_export.h"
11 #include "cc/resources/resource_update.h"
13 namespace cc {
15 class CC_EXPORT ResourceUpdateQueue {
16 public:
17 ResourceUpdateQueue();
18 virtual ~ResourceUpdateQueue();
20 void AppendFullUpload(const ResourceUpdate& upload);
21 void AppendPartialUpload(const ResourceUpdate& upload);
23 void ClearUploadsToEvictedResources();
25 ResourceUpdate TakeFirstFullUpload();
26 ResourceUpdate TakeFirstPartialUpload();
28 size_t FullUploadSize() const { return full_entries_.size(); }
29 size_t PartialUploadSize() const { return partial_entries_.size(); }
31 bool HasMoreUpdates() const;
33 private:
34 void ClearUploadsToEvictedResources(std::deque<ResourceUpdate>* entry_queue);
35 std::deque<ResourceUpdate> full_entries_;
36 std::deque<ResourceUpdate> partial_entries_;
38 DISALLOW_COPY_AND_ASSIGN(ResourceUpdateQueue);
41 } // namespace cc
43 #endif // CC_RESOURCES_RESOURCE_UPDATE_QUEUE_H_