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_
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"
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
);
33 ResourceFormat format
;
36 gpu::MailboxHolder mailbox_holder
;
37 bool read_lock_fences_enabled
;
45 #endif // CC_RESOURCES_TRANSFERABLE_RESOURCE_H_