GPU workaround to simulate Out of Memory errors with large textures
[chromium-blink-merge.git] / cc / resources / transferable_resource.h
blob03b47e616c8bf3965057ecc428b0af85c9bd39b9
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/resources/resource_format.h"
13 #include "gpu/command_buffer/common/mailbox_holder.h"
14 #include "ui/gfx/geometry/size.h"
16 namespace cc {
18 struct ReturnedResource;
19 typedef std::vector<ReturnedResource> ReturnedResourceArray;
20 struct TransferableResource;
21 typedef std::vector<TransferableResource> TransferableResourceArray;
23 struct CC_EXPORT TransferableResource {
24 TransferableResource();
25 ~TransferableResource();
27 ReturnedResource ToReturnedResource() const;
28 static void ReturnResources(const TransferableResourceArray& input,
29 ReturnedResourceArray* output);
31 unsigned id;
32 ResourceFormat format;
33 uint32 filter;
34 gfx::Size size;
35 gpu::MailboxHolder mailbox_holder;
36 bool is_repeated;
37 bool is_software;
38 bool allow_overlay;
41 } // namespace cc
43 #endif // CC_RESOURCES_TRANSFERABLE_RESOURCE_H_