Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(435)

Side by Side Diff: cc/resources/transferable_resource.h

Issue 2748903002: cc: Add gfx::BufferFormat to cc::ResourceProvider::Resource. (Closed)
Patch Set: Always initialize buffer_format. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/resources/resource_provider.cc ('k') | cc/resources/transferable_resource.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_RESOURCES_TRANSFERABLE_RESOURCE_H_ 5 #ifndef CC_RESOURCES_TRANSFERABLE_RESOURCE_H_
6 #define CC_RESOURCES_TRANSFERABLE_RESOURCE_H_ 6 #define CC_RESOURCES_TRANSFERABLE_RESOURCE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <vector> 10 #include <vector>
11 11
12 #include "cc/base/cc_export.h" 12 #include "cc/base/cc_export.h"
13 #include "cc/base/resource_id.h" 13 #include "cc/base/resource_id.h"
14 #include "cc/resources/resource_format.h" 14 #include "cc/resources/resource_format.h"
15 #include "gpu/command_buffer/common/mailbox_holder.h" 15 #include "gpu/command_buffer/common/mailbox_holder.h"
16 #include "ui/gfx/buffer_types.h"
16 #include "ui/gfx/color_space.h" 17 #include "ui/gfx/color_space.h"
17 #include "ui/gfx/geometry/size.h" 18 #include "ui/gfx/geometry/size.h"
18 19
19 namespace cc { 20 namespace cc {
20 21
21 struct ReturnedResource; 22 struct ReturnedResource;
22 typedef std::vector<ReturnedResource> ReturnedResourceArray; 23 typedef std::vector<ReturnedResource> ReturnedResourceArray;
23 struct TransferableResource; 24 struct TransferableResource;
24 typedef std::vector<TransferableResource> TransferableResourceArray; 25 typedef std::vector<TransferableResource> TransferableResourceArray;
25 26
26 struct CC_EXPORT TransferableResource { 27 struct CC_EXPORT TransferableResource {
27 TransferableResource(); 28 TransferableResource();
28 TransferableResource(const TransferableResource& other); 29 TransferableResource(const TransferableResource& other);
29 ~TransferableResource(); 30 ~TransferableResource();
30 31
31 ReturnedResource ToReturnedResource() const; 32 ReturnedResource ToReturnedResource() const;
32 static void ReturnResources(const TransferableResourceArray& input, 33 static void ReturnResources(const TransferableResourceArray& input,
33 ReturnedResourceArray* output); 34 ReturnedResourceArray* output);
34 35
35 ResourceId id; 36 ResourceId id;
37 // Refer to ResourceProvider::Resource for the meaning of the following data.
36 ResourceFormat format; 38 ResourceFormat format;
39 gfx::BufferFormat buffer_format;
37 uint32_t filter; 40 uint32_t filter;
38 gfx::Size size; 41 gfx::Size size;
39 gpu::MailboxHolder mailbox_holder; 42 gpu::MailboxHolder mailbox_holder;
40 bool read_lock_fences_enabled; 43 bool read_lock_fences_enabled;
41 bool is_software; 44 bool is_software;
42 #if defined(OS_ANDROID) 45 #if defined(OS_ANDROID)
43 bool is_backed_by_surface_texture; 46 bool is_backed_by_surface_texture;
44 bool wants_promotion_hint; 47 bool wants_promotion_hint;
45 #endif 48 #endif
46 bool is_overlay_candidate; 49 bool is_overlay_candidate;
47 gfx::ColorSpace color_space; 50 gfx::ColorSpace color_space;
48 }; 51 };
49 52
50 } // namespace cc 53 } // namespace cc
51 54
52 #endif // CC_RESOURCES_TRANSFERABLE_RESOURCE_H_ 55 #endif // CC_RESOURCES_TRANSFERABLE_RESOURCE_H_
OLDNEW
« no previous file with comments | « cc/resources/resource_provider.cc ('k') | cc/resources/transferable_resource.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698