OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2010 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. |
| 4 |
| 5 #ifndef PPAPI_C_DEV_PPB_SURFACE_3D_DEV_H_ |
| 6 #define PPAPI_C_DEV_PPB_SURFACE_3D_DEV_H_ |
| 7 |
| 8 #include "ppapi/c/pp_bool.h" |
| 9 #include "ppapi/c/pp_module.h" |
| 10 #include "ppapi/c/pp_resource.h" |
| 11 |
| 12 #define PPB_SURFACE_3D_DEV_INTERFACE "PPB_Surface3D(Dev);0.1" |
| 13 |
| 14 struct PPB_Surface3D_Dev { |
| 15 PP_Bool (*IsSurface3D)(PP_Resource resource); |
| 16 |
| 17 int32_t (*Create)(PP_Module module, |
| 18 int32_t config, |
| 19 const int32_t* attrib_list, |
| 20 PP_Resource* surface); |
| 21 |
| 22 int32_t (*SetAttrib)(PP_Resource surface, |
| 23 int32_t attribute, |
| 24 int32_t value); |
| 25 |
| 26 int32_t (*GetAttrib)(PP_Resource surface, |
| 27 int32_t attribute, |
| 28 int32_t* value); |
| 29 |
| 30 // Snapshots the rendered frame and makes it available for composition with |
| 31 // the rest of the page. The alpha channel is used for translucency effects. |
| 32 // One means fully opaque. Zero means fully transparent. Any thread. |
| 33 // TODO(apatrick): premultiplied alpha or linear alpha? Premultiplied alpha is |
| 34 // better for correct alpha blending effect. Most existing OpenGL code assumes |
| 35 // linear. I could convert from linear to premultiplied during the copy from |
| 36 // back-buffer to offscreen "front-buffer". |
| 37 int32_t (*SwapBuffers)(PP_Resource surface); |
| 38 }; |
| 39 |
| 40 #endif // PPAPI_C_DEV_PPB_SURFACE_3D_DEV_H_ |
OLD | NEW |