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

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

Issue 238923007: PPAPI: Format ppapi/thunk using clang-format. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 6 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « ppapi/thunk/ppb_graphics_2d_thunk.cc ('k') | ppapi/thunk/ppb_host_resolver_thunk.cc » ('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) 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 // From ppb_graphics_3d.idl modified Thu Oct 31 12:30:06 2013. 5 // From ppb_graphics_3d.idl modified Fri Nov 1 16:12:12 2013.
6 6
7 #include "ppapi/c/pp_completion_callback.h" 7 #include "ppapi/c/pp_completion_callback.h"
8 #include "ppapi/c/pp_errors.h" 8 #include "ppapi/c/pp_errors.h"
9 #include "ppapi/c/ppb_graphics_3d.h" 9 #include "ppapi/c/ppb_graphics_3d.h"
10 #include "ppapi/shared_impl/tracked_callback.h" 10 #include "ppapi/shared_impl/tracked_callback.h"
11 #include "ppapi/thunk/enter.h" 11 #include "ppapi/thunk/enter.h"
12 #include "ppapi/thunk/ppapi_thunk_export.h" 12 #include "ppapi/thunk/ppapi_thunk_export.h"
13 #include "ppapi/thunk/ppb_graphics_3d_api.h" 13 #include "ppapi/thunk/ppb_graphics_3d_api.h"
14 14
15 namespace ppapi { 15 namespace ppapi {
(...skipping 11 matching lines...) Expand all
27 return enter.object()->GetAttribMaxValue(attribute, value); 27 return enter.object()->GetAttribMaxValue(attribute, value);
28 } 28 }
29 29
30 PP_Resource Create(PP_Instance instance, 30 PP_Resource Create(PP_Instance instance,
31 PP_Resource share_context, 31 PP_Resource share_context,
32 const int32_t attrib_list[]) { 32 const int32_t attrib_list[]) {
33 VLOG(4) << "PPB_Graphics3D::Create()"; 33 VLOG(4) << "PPB_Graphics3D::Create()";
34 EnterResourceCreation enter(instance); 34 EnterResourceCreation enter(instance);
35 if (enter.failed()) 35 if (enter.failed())
36 return 0; 36 return 0;
37 return enter.functions()->CreateGraphics3D(instance, 37 return enter.functions()->CreateGraphics3D(instance, share_context,
38 share_context,
39 attrib_list); 38 attrib_list);
40 } 39 }
41 40
42 PP_Bool IsGraphics3D(PP_Resource resource) { 41 PP_Bool IsGraphics3D(PP_Resource resource) {
43 VLOG(4) << "PPB_Graphics3D::IsGraphics3D()"; 42 VLOG(4) << "PPB_Graphics3D::IsGraphics3D()";
44 EnterResource<PPB_Graphics3D_API> enter(resource, false); 43 EnterResource<PPB_Graphics3D_API> enter(resource, false);
45 return PP_FromBool(enter.succeeded()); 44 return PP_FromBool(enter.succeeded());
46 } 45 }
47 46
48 int32_t GetAttribs(PP_Resource context, int32_t attrib_list[]) { 47 int32_t GetAttribs(PP_Resource context, int32_t attrib_list[]) {
(...skipping 30 matching lines...) Expand all
79 78
80 int32_t SwapBuffers(PP_Resource context, 79 int32_t SwapBuffers(PP_Resource context,
81 struct PP_CompletionCallback callback) { 80 struct PP_CompletionCallback callback) {
82 VLOG(4) << "PPB_Graphics3D::SwapBuffers()"; 81 VLOG(4) << "PPB_Graphics3D::SwapBuffers()";
83 EnterResource<PPB_Graphics3D_API> enter(context, callback, true); 82 EnterResource<PPB_Graphics3D_API> enter(context, callback, true);
84 if (enter.failed()) 83 if (enter.failed())
85 return enter.retval(); 84 return enter.retval();
86 return enter.SetResult(enter.object()->SwapBuffers(enter.callback())); 85 return enter.SetResult(enter.object()->SwapBuffers(enter.callback()));
87 } 86 }
88 87
89 const PPB_Graphics3D_1_0 g_ppb_graphics3d_thunk_1_0 = { 88 const PPB_Graphics3D_1_0 g_ppb_graphics3d_thunk_1_0 = {&GetAttribMaxValue,
90 &GetAttribMaxValue, 89 &Create,
91 &Create, 90 &IsGraphics3D,
92 &IsGraphics3D, 91 &GetAttribs,
93 &GetAttribs, 92 &SetAttribs,
94 &SetAttribs, 93 &GetError,
95 &GetError, 94 &ResizeBuffers,
96 &ResizeBuffers, 95 &SwapBuffers};
97 &SwapBuffers
98 };
99 96
100 } // namespace 97 } // namespace
101 98
102 PPAPI_THUNK_EXPORT const PPB_Graphics3D_1_0* GetPPB_Graphics3D_1_0_Thunk() { 99 PPAPI_THUNK_EXPORT const PPB_Graphics3D_1_0* GetPPB_Graphics3D_1_0_Thunk() {
103 return &g_ppb_graphics3d_thunk_1_0; 100 return &g_ppb_graphics3d_thunk_1_0;
104 } 101 }
105 102
106 } // namespace thunk 103 } // namespace thunk
107 } // namespace ppapi 104 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/thunk/ppb_graphics_2d_thunk.cc ('k') | ppapi/thunk/ppb_host_resolver_thunk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698