Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / cc / resources / transferable_resource.h
blob6f38a62f7fc84b05635f8644237629b0d166b0a4
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_TRANSFERABLE_RESOURCE_H_
6 #define CC_RESOURCES_TRANSFERABLE_RESOURCE_H_
8 #include <vector>
10 #include "base/basictypes.h"
11 #include "cc/base/cc_export.h"
12 #include "cc/base/resource_id.h"
13 #include "cc/resources/resource_format.h"
14 #include "gpu/command_buffer/common/mailbox_holder.h"
15 #include "ui/gfx/geometry/size.h"
17 namespace cc {
19 struct ReturnedResource;
20 typedef std::vector<ReturnedResource> ReturnedResourceArray;
21 struct TransferableResource;
22 typedef std::vector<TransferableResource> TransferableResourceArray;
24 struct CC_EXPORT TransferableResource {
25 TransferableResource();
26 ~TransferableResource();
28 ReturnedResource ToReturnedResource() const;
29 static void ReturnResources(const TransferableResourceArray& input,
30 ReturnedResourceArray* output);
32 ResourceId id;
33 ResourceFormat format;
34 uint32 filter;
35 gfx::Size size;
36 gpu::MailboxHolder mailbox_holder;
37 bool read_lock_fences_enabled;
38 bool is_repeated;
39 bool is_software;
40 bool allow_overlay;
43 } // namespace cc
45 #endif // CC_RESOURCES_TRANSFERABLE_RESOURCE_H_