Chromium Code Reviews| Index: ppapi/c/dev/ppb_surface_3d_dev.h |
| =================================================================== |
| --- ppapi/c/dev/ppb_surface_3d_dev.h (revision 0) |
| +++ ppapi/c/dev/ppb_surface_3d_dev.h (revision 0) |
| @@ -0,0 +1,40 @@ |
| +// Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef PPAPI_C_DEV_PPB_SURFACE_3D_DEV_H_ |
| +#define PPAPI_C_DEV_PPB_SURFACE_3D_DEV_H_ |
| + |
| +#include "ppapi/c/pp_bool.h" |
| +#include "ppapi/c/pp_module.h" |
| +#include "ppapi/c/pp_resource.h" |
| + |
| +#define PPB_SURFACE_3D_DEV_INTERFACE "PPB_Surface3D(Dev);0.1" |
| + |
| +struct PPB_Surface3D_Dev { |
| + PP_Bool (*IsSurface3D)(PP_Resource resource); |
| + |
| + int32_t (*Create)(PP_Module module, |
|
brettw
2010/12/07 05:51:06
Create should be first & return a PP_Resource.
Pl
|
| + int32_t config, |
| + const int32_t* attrib_list, |
| + PP_Resource* surface); |
| + |
| + int32_t (*SetAttrib)(PP_Resource surface, |
| + int32_t attribute, |
| + int32_t value); |
| + |
| + int32_t (*GetAttrib)(PP_Resource surface, |
| + int32_t attribute, |
| + int32_t* value); |
| + |
| + // Snapshots the rendered frame and makes it available for composition with |
| + // the rest of the page. The alpha channel is used for translucency effects. |
| + // One means fully opaque. Zero means fully transparent. Any thread. |
| + // TODO(apatrick): premultiplied alpha or linear alpha? Premultiplied alpha is |
| + // better for correct alpha blending effect. Most existing OpenGL code assumes |
| + // linear. I could convert from linear to premultiplied during the copy from |
| + // back-buffer to offscreen "front-buffer". |
| + int32_t (*SwapBuffers)(PP_Resource surface); |
| +}; |
| + |
| +#endif // PPAPI_C_DEV_PPB_SURFACE_3D_DEV_H_ |
| Property changes on: ppapi\c\dev\ppb_surface_3d_dev.h |
| ___________________________________________________________________ |
| Added: svn:eol-style |
| + LF |