Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(131)

Unified Diff: ppapi/c/dev/ppb_surface_3d_dev.h

Issue 5567004: Proposed changes to Pepper 3D API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698