| OLD | NEW |
| 1 /* Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2011 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_C_DEV_PPB_LAYER_COMPOSITOR_DEV_H_ | 5 #ifndef PPAPI_C_DEV_PPB_LAYER_COMPOSITOR_DEV_H_ |
| 6 #define PPAPI_C_DEV_PPB_LAYER_COMPOSITOR_DEV_H_ | 6 #define PPAPI_C_DEV_PPB_LAYER_COMPOSITOR_DEV_H_ |
| 7 | 7 |
| 8 #include "ppapi/c/pp_bool.h" | 8 #include "ppapi/c/pp_bool.h" |
| 9 #include "ppapi/c/pp_completion_callback.h" | 9 #include "ppapi/c/pp_completion_callback.h" |
| 10 #include "ppapi/c/pp_instance.h" | 10 #include "ppapi/c/pp_instance.h" |
| 11 #include "ppapi/c/pp_resource.h" | 11 #include "ppapi/c/pp_resource.h" |
| 12 #include "ppapi/c/pp_size.h" | 12 #include "ppapi/c/pp_size.h" |
| 13 | 13 |
| 14 #define PPB_LAYER_COMPOSITOR_DEV_INTERFACE_0_2 "PPB_LayerCompositor(Dev);0.2" | 14 #define PPB_LAYER_COMPOSITOR_DEV_INTERFACE_0_2 "PPB_LayerCompositor(Dev);0.2" |
| 15 #define PPB_LAYER_COMPOSITOR_DEV_INTERFACE \ | 15 #define PPB_LAYER_COMPOSITOR_DEV_INTERFACE \ |
| 16 PPB_LAYER_COMPOSITOR_DEV_INTERFACE_0_2 | 16 PPB_LAYER_COMPOSITOR_DEV_INTERFACE_0_2 |
| 17 | 17 |
| 18 // PPB_LayerCompositor allows multiple layers of PPB_Surface3D and | 18 // PPB_LayerCompositor allows multiple layers of PPB_Surface3D and |
| 19 // PPB_VideoLayer be bound to a plugin instance. | 19 // PPB_VideoLayer be bound to a plugin instance. |
| 20 // | 20 // |
| 21 // Use PPB_Instance's BindGraphics() to bind a PPB_LayerCompositor to the | 21 // Use PPB_Instance's BindGraphics() to bind a PPB_LayerCompositor to the |
| 22 // instance. | 22 // instance. |
| 23 // | 23 // |
| 24 // This also allows each layer to be updated seperately to avoid excessive | 24 // This also allows each layer to be updated seperately to avoid excessive |
| 25 // compositing. | 25 // compositing. |
| 26 struct PPB_LayerCompositor_Dev { | 26 struct PPB_LayerCompositor_Dev_0_2 { |
| 27 // Creates a video layer. | 27 // Creates a video layer. |
| 28 PP_Resource (*Create)(PP_Instance instance); | 28 PP_Resource (*Create)(PP_Instance instance); |
| 29 | 29 |
| 30 // Returns PP_TRUE if the input parameter is a PPB_LayerCompositor_Dev object. | 30 // Returns PP_TRUE if the input parameter is a PPB_LayerCompositor_Dev object. |
| 31 PP_Bool (*IsLayerCompositor)(PP_Resource resource); | 31 PP_Bool (*IsLayerCompositor)(PP_Resource resource); |
| 32 | 32 |
| 33 // Add a layer to be composited. Return PP_TRUE if |layer| is accepted. | 33 // Add a layer to be composited. Return PP_TRUE if |layer| is accepted. |
| 34 // | 34 // |
| 35 // Note that after a PPB_Surface3D is added to this compositor, calling to | 35 // Note that after a PPB_Surface3D is added to this compositor, calling to |
| 36 // the layer's SwapBuffer() method will have no effect. | 36 // the layer's SwapBuffer() method will have no effect. |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 // updates made available for compositing. | 68 // updates made available for compositing. |
| 69 // | 69 // |
| 70 // Since this is an asynchronous operation, |callback| will be called when | 70 // Since this is an asynchronous operation, |callback| will be called when |
| 71 // this operation is done. | 71 // this operation is done. |
| 72 // | 72 // |
| 73 // Returns an error code from pp_errors.h. | 73 // Returns an error code from pp_errors.h. |
| 74 int32_t (*SwapBuffers)(PP_Resource compositor, | 74 int32_t (*SwapBuffers)(PP_Resource compositor, |
| 75 struct PP_CompletionCallback callback); | 75 struct PP_CompletionCallback callback); |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 typedef struct PPB_LayerCompositor_Dev_0_2 PPB_LayerCompositor_Dev; |
| 79 |
| 78 #endif /* PPAPI_C_DEV_PPB_LAYER_COMPOSITOR_DEV_H_ */ | 80 #endif /* PPAPI_C_DEV_PPB_LAYER_COMPOSITOR_DEV_H_ */ |
| OLD | NEW |