Chromium Code Reviews| Index: ppapi/thunk/ppb_graphics_3d_thunk.cc |
| =================================================================== |
| --- ppapi/thunk/ppb_graphics_3d_thunk.cc (revision 99369) |
| +++ ppapi/thunk/ppb_graphics_3d_thunk.cc (working copy) |
| @@ -17,6 +17,13 @@ |
| typedef EnterResource<PPB_Graphics3D_API> EnterGraphics3D; |
| +int32_t GetAttribMaxValue(PP_Resource instance, |
| + int32_t attribute, |
| + int32_t* value) { |
| + // TODO(alokp): Implement me. |
|
nfullagar
2011/09/02 18:34:54
What's the plan on impl vs moving out of dev here?
alokp
2011/09/02 19:57:40
My understanding from API review meeting was that
brettw
2011/09/02 20:21:45
2 space indent, same below.
alokp
2011/09/02 21:41:02
Done.
|
| + return PP_ERROR_FAILED; |
| +} |
| + |
| PP_Resource Create(PP_Instance instance, |
| PP_Resource share_context, |
| const int32_t* attrib_list) { |
| @@ -46,6 +53,14 @@ |
| return enter.object()->SetAttribs(attrib_list); |
| } |
| +int32_t GetError(PP_Resource graphics_3d) { |
| + EnterGraphics3D enter(graphics_3d, true); |
| + if (enter.failed()) |
| + return PP_ERROR_BADRESOURCE; |
| + |
| + return enter.object()->GetError(); |
| +} |
| + |
| int32_t ResizeBuffers(PP_Resource graphics_3d, int32_t width, int32_t height) { |
| EnterGraphics3D enter(graphics_3d, true); |
| if (enter.failed()) |
| @@ -62,10 +77,12 @@ |
| } |
| const PPB_Graphics3D_Dev g_ppb_graphics_3d_thunk = { |
| + &GetAttribMaxValue, |
| &Create, |
| &IsGraphics3D, |
| &GetAttribs, |
| &SetAttribs, |
| + &GetError, |
| &ResizeBuffers, |
| &SwapBuffers |
| }; |