OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 PPAPI_SHARED_IMPL_COMPOSITOR_LAYER_DATA_H_ | 5 #ifndef PPAPI_SHARED_IMPL_COMPOSITOR_LAYER_DATA_H_ |
6 #define PPAPI_SHARED_IMPL_COMPOSITOR_LAYER_DATA_H_ | 6 #define PPAPI_SHARED_IMPL_COMPOSITOR_LAYER_DATA_H_ |
7 | 7 |
8 #include <string.h> | 8 #include <string.h> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "gpu/command_buffer/common/mailbox.h" | 12 #include "gpu/command_buffer/common/mailbox.h" |
| 13 #include "gpu/command_buffer/common/sync_token.h" |
13 #include "ppapi/c/ppb_compositor_layer.h" | 14 #include "ppapi/c/ppb_compositor_layer.h" |
14 #include "ppapi/shared_impl/host_resource.h" | 15 #include "ppapi/shared_impl/host_resource.h" |
15 #include "ppapi/shared_impl/ppapi_shared_export.h" | 16 #include "ppapi/shared_impl/ppapi_shared_export.h" |
16 | 17 |
17 namespace ppapi { | 18 namespace ppapi { |
18 | 19 |
19 struct PPAPI_SHARED_EXPORT CompositorLayerData { | 20 struct PPAPI_SHARED_EXPORT CompositorLayerData { |
20 | 21 |
21 struct Transform { | 22 struct Transform { |
22 Transform() { | 23 Transform() { |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 : resource(0), | 73 : resource(0), |
73 source_rect(PP_MakeFloatRectFromXYWH(0.0f, 0.0f, 0.0f, 0.0f)) {} | 74 source_rect(PP_MakeFloatRectFromXYWH(0.0f, 0.0f, 0.0f, 0.0f)) {} |
74 | 75 |
75 PP_Resource resource; | 76 PP_Resource resource; |
76 PP_FloatRect source_rect; | 77 PP_FloatRect source_rect; |
77 }; | 78 }; |
78 | 79 |
79 struct TextureLayer { | 80 struct TextureLayer { |
80 TextureLayer() | 81 TextureLayer() |
81 : target(0), | 82 : target(0), |
82 sync_point(0), | |
83 source_rect(PP_MakeFloatRectFromXYWH(0.0f, 0.0f, 1.0f, 1.0f)), | 83 source_rect(PP_MakeFloatRectFromXYWH(0.0f, 0.0f, 1.0f, 1.0f)), |
84 premult_alpha(true) {} | 84 premult_alpha(true) {} |
85 | 85 |
86 gpu::Mailbox mailbox; | 86 gpu::Mailbox mailbox; |
| 87 gpu::SyncToken sync_token; |
87 uint32_t target; | 88 uint32_t target; |
88 uint32_t sync_point; | |
89 PP_FloatRect source_rect; | 89 PP_FloatRect source_rect; |
90 bool premult_alpha; | 90 bool premult_alpha; |
91 }; | 91 }; |
92 | 92 |
93 CompositorLayerData() {} | 93 CompositorLayerData() {} |
94 | 94 |
95 CompositorLayerData(const CompositorLayerData& other) { | 95 CompositorLayerData(const CompositorLayerData& other) { |
96 *this = other; | 96 *this = other; |
97 } | 97 } |
98 | 98 |
(...skipping 13 matching lines...) Expand all Loading... |
112 | 112 |
113 LayerCommon common; | 113 LayerCommon common; |
114 scoped_ptr<ColorLayer> color; | 114 scoped_ptr<ColorLayer> color; |
115 scoped_ptr<TextureLayer> texture; | 115 scoped_ptr<TextureLayer> texture; |
116 scoped_ptr<ImageLayer> image; | 116 scoped_ptr<ImageLayer> image; |
117 }; | 117 }; |
118 | 118 |
119 } // namespace ppapi | 119 } // namespace ppapi |
120 | 120 |
121 #endif // PPAPI_SHARED_IMPL_COMPOSITOR_LAYER_DATA_H_ | 121 #endif // PPAPI_SHARED_IMPL_COMPOSITOR_LAYER_DATA_H_ |
OLD | NEW |