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 <stdint.h> | 8 #include <stdint.h> |
9 #include <string.h> | 9 #include <string.h> |
10 | 10 |
| 11 #include <memory> |
| 12 |
11 #include "base/logging.h" | 13 #include "base/logging.h" |
12 #include "base/memory/scoped_ptr.h" | |
13 #include "gpu/command_buffer/common/mailbox.h" | 14 #include "gpu/command_buffer/common/mailbox.h" |
14 #include "gpu/command_buffer/common/sync_token.h" | 15 #include "gpu/command_buffer/common/sync_token.h" |
15 #include "ppapi/c/ppb_compositor_layer.h" | 16 #include "ppapi/c/ppb_compositor_layer.h" |
16 #include "ppapi/shared_impl/host_resource.h" | 17 #include "ppapi/shared_impl/host_resource.h" |
17 #include "ppapi/shared_impl/ppapi_shared_export.h" | 18 #include "ppapi/shared_impl/ppapi_shared_export.h" |
18 | 19 |
19 namespace ppapi { | 20 namespace ppapi { |
20 | 21 |
21 struct PPAPI_SHARED_EXPORT CompositorLayerData { | 22 struct PPAPI_SHARED_EXPORT CompositorLayerData { |
22 | 23 |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 int i = 0; | 106 int i = 0; |
106 if (color) ++i; | 107 if (color) ++i; |
107 if (texture) ++i; | 108 if (texture) ++i; |
108 if (image) ++i; | 109 if (image) ++i; |
109 return i == 1; | 110 return i == 1; |
110 } | 111 } |
111 | 112 |
112 const CompositorLayerData& operator=(const CompositorLayerData& other); | 113 const CompositorLayerData& operator=(const CompositorLayerData& other); |
113 | 114 |
114 LayerCommon common; | 115 LayerCommon common; |
115 scoped_ptr<ColorLayer> color; | 116 std::unique_ptr<ColorLayer> color; |
116 scoped_ptr<TextureLayer> texture; | 117 std::unique_ptr<TextureLayer> texture; |
117 scoped_ptr<ImageLayer> image; | 118 std::unique_ptr<ImageLayer> image; |
118 }; | 119 }; |
119 | 120 |
120 } // namespace ppapi | 121 } // namespace ppapi |
121 | 122 |
122 #endif // PPAPI_SHARED_IMPL_COMPOSITOR_LAYER_DATA_H_ | 123 #endif // PPAPI_SHARED_IMPL_COMPOSITOR_LAYER_DATA_H_ |
OLD | NEW |