Chromium Code Reviews

Side by Side Diff: ppapi/c/dev/ppb_graphics_3d_dev.h

Issue 5927002: Moved the logic of maintaining the current context to gles2 helper library. (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.
Jump to:
View unified diff | | Annotate | Revision Log
« no previous file with comments | « ppapi/GLES2/khrplatform.h ('k') | ppapi/c/dev/ppb_opengles_dev.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Copyright (c) 2010 The Chromium Authors. All rights reserved. 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 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_GRAPHICS_3D_DEV_H_ 5 #ifndef PPAPI_C_DEV_PPB_GRAPHICS_3D_DEV_H_
6 #define PPAPI_C_DEV_PPB_GRAPHICS_3D_DEV_H_ 6 #define PPAPI_C_DEV_PPB_GRAPHICS_3D_DEV_H_
7 7
8 #include "ppapi/c/pp_bool.h" 8 #include "ppapi/c/pp_bool.h"
9 #include "ppapi/c/pp_instance.h" 9 #include "ppapi/c/pp_instance.h"
10 #include "ppapi/c/pp_module.h" 10 #include "ppapi/c/pp_module.h"
(...skipping 60 matching lines...)
71 // another thread leads to undefined behavior. 71 // another thread leads to undefined behavior.
72 PP_Resource (*CreateContext)(PP_Instance instance, 72 PP_Resource (*CreateContext)(PP_Instance instance,
73 int32_t config, 73 int32_t config,
74 int32_t share_context, 74 int32_t share_context,
75 const int32_t* attrib_list); 75 const int32_t* attrib_list);
76 76
77 // Get the address of any GL functions, whether core or part of an extension. 77 // Get the address of any GL functions, whether core or part of an extension.
78 // Any thread. 78 // Any thread.
79 void* (*GetProcAddress)(const char* name); 79 void* (*GetProcAddress)(const char* name);
80 80
81 // Make a particular context current of the calling thread. Returns PP_TRUE
82 // on success, PP_FALSE on failure.
83 PP_Bool (*MakeCurent)(PP_Resource context);
84
85 // Returns the calling thread's current context or NULL if no context is
86 // current.
87 PP_Resource (*GetCurrentContext)();
88
89 // Snapshots the rendered frame and makes it available for composition with 81 // Snapshots the rendered frame and makes it available for composition with
90 // the rest of the page. The alpha channel is used for translucency effects. 82 // the rest of the page. The alpha channel is used for translucency effects.
91 // One means fully opaque. Zero means fully transparent. Any thread. 83 // One means fully opaque. Zero means fully transparent. Any thread.
92 // TODO(apatrick): premultiplied alpha or linear alpha? Premultiplied alpha is 84 // TODO(apatrick): premultiplied alpha or linear alpha? Premultiplied alpha is
93 // better for correct alpha blending effect. Most existing OpenGL code assumes 85 // better for correct alpha blending effect. Most existing OpenGL code assumes
94 // linear. I could convert from linear to premultiplied during the copy from 86 // linear. I could convert from linear to premultiplied during the copy from
95 // back-buffer to offscreen "front-buffer". 87 // back-buffer to offscreen "front-buffer".
96 PP_Bool (*SwapBuffers)(PP_Resource context); 88 PP_Bool (*SwapBuffers)(PP_Resource context);
97 89
98 // Returns the current error for this thread. This is not associated with a 90 // Returns the current error for this thread. This is not associated with a
99 // particular context. It is distinct from the GL error returned by 91 // particular context. It is distinct from the GL error returned by
100 // glGetError. 92 // glGetError.
101 uint32_t (*GetError)(); 93 uint32_t (*GetError)();
102 }; 94 };
103 95
104 #endif /* PPAPI_C_DEV_PPB_GRAPHICS_3D_DEV_H_ */ 96 #endif /* PPAPI_C_DEV_PPB_GRAPHICS_3D_DEV_H_ */
105 97
OLDNEW
« no previous file with comments | « ppapi/GLES2/khrplatform.h ('k') | ppapi/c/dev/ppb_opengles_dev.h » ('j') | no next file with comments »

Powered by Google App Engine