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

Side by Side Diff: ppapi/thunk/ppb_graphics_3d_thunk.cc

Issue 10386145: Add the necessary plumbing mechanisms to ensure proper WebGL support inside the <browser> tag, whic… (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Shuffle EnterResource back out of the thunk layer Created 8 years, 6 months 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "ppapi/c/pp_completion_callback.h" 5 #include "ppapi/c/pp_completion_callback.h"
6 #include "ppapi/c/pp_errors.h" 6 #include "ppapi/c/pp_errors.h"
7 #include "ppapi/thunk/enter.h" 7 #include "ppapi/thunk/enter.h"
8 #include "ppapi/thunk/thunk.h" 8 #include "ppapi/thunk/thunk.h"
9 #include "ppapi/thunk/ppb_graphics_3d_api.h" 9 #include "ppapi/thunk/ppb_graphics_3d_api.h"
10 #include "ppapi/thunk/resource_creation_api.h" 10 #include "ppapi/thunk/resource_creation_api.h"
(...skipping 11 matching lines...) Expand all
22 // TODO(alokp): Implement me. 22 // TODO(alokp): Implement me.
23 return PP_ERROR_FAILED; 23 return PP_ERROR_FAILED;
24 } 24 }
25 25
26 PP_Resource Create(PP_Instance instance, 26 PP_Resource Create(PP_Instance instance,
27 PP_Resource share_context, 27 PP_Resource share_context,
28 const int32_t attrib_list[]) { 28 const int32_t attrib_list[]) {
29 EnterResourceCreation enter(instance); 29 EnterResourceCreation enter(instance);
30 if (enter.failed()) 30 if (enter.failed())
31 return 0; 31 return 0;
32
Fady Samuel 2012/05/28 14:11:45 Please remove.
32 return enter.functions()->CreateGraphics3D( 33 return enter.functions()->CreateGraphics3D(
33 instance, share_context, attrib_list); 34 instance, share_context, attrib_list);
34 } 35 }
35 36
36 PP_Bool IsGraphics3D(PP_Resource resource) { 37 PP_Bool IsGraphics3D(PP_Resource resource) {
37 EnterGraphics3D enter(resource, false); 38 EnterGraphics3D enter(resource, false);
38 return PP_FromBool(enter.succeeded()); 39 return PP_FromBool(enter.succeeded());
39 } 40 }
40 41
41 int32_t GetAttribs(PP_Resource graphics_3d, int32_t attrib_list[]) { 42 int32_t GetAttribs(PP_Resource graphics_3d, int32_t attrib_list[]) {
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 }; 86 };
86 87
87 } // namespace 88 } // namespace
88 89
89 const PPB_Graphics3D_1_0* GetPPB_Graphics3D_1_0_Thunk() { 90 const PPB_Graphics3D_1_0* GetPPB_Graphics3D_1_0_Thunk() {
90 return &g_ppb_graphics_3d_thunk; 91 return &g_ppb_graphics_3d_thunk;
91 } 92 }
92 93
93 } // namespace thunk 94 } // namespace thunk
94 } // namespace ppapi 95 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698