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

Side by Side Diff: ppapi/thunk/ppb_graphics_2d_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_gamepad_thunk.cc ('k') | ppapi/thunk/ppb_graphics_3d_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_2d.idl modified Tue Aug 20 08:13:36 2013. 5 // From ppb_graphics_2d.idl modified Wed May 15 13:57:07 2013.
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include "ppapi/c/pp_completion_callback.h" 9 #include "ppapi/c/pp_completion_callback.h"
10 #include "ppapi/c/pp_errors.h" 10 #include "ppapi/c/pp_errors.h"
11 #include "ppapi/c/ppb_graphics_2d.h" 11 #include "ppapi/c/ppb_graphics_2d.h"
12 #include "ppapi/shared_impl/tracked_callback.h" 12 #include "ppapi/shared_impl/tracked_callback.h"
13 #include "ppapi/thunk/enter.h" 13 #include "ppapi/thunk/enter.h"
14 #include "ppapi/thunk/ppapi_thunk_export.h" 14 #include "ppapi/thunk/ppapi_thunk_export.h"
15 #include "ppapi/thunk/ppb_graphics_2d_api.h" 15 #include "ppapi/thunk/ppb_graphics_2d_api.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 } 94 }
95 95
96 float GetScale(PP_Resource resource) { 96 float GetScale(PP_Resource resource) {
97 VLOG(4) << "PPB_Graphics2D::GetScale()"; 97 VLOG(4) << "PPB_Graphics2D::GetScale()";
98 EnterResource<PPB_Graphics2D_API> enter(resource, true); 98 EnterResource<PPB_Graphics2D_API> enter(resource, true);
99 if (enter.failed()) 99 if (enter.failed())
100 return 0.0f; 100 return 0.0f;
101 return enter.object()->GetScale(); 101 return enter.object()->GetScale();
102 } 102 }
103 103
104 const PPB_Graphics2D_1_0 g_ppb_graphics2d_thunk_1_0 = { 104 const PPB_Graphics2D_1_0 g_ppb_graphics2d_thunk_1_0 = {&Create,
105 &Create, 105 &IsGraphics2D,
106 &IsGraphics2D, 106 &Describe,
107 &Describe, 107 &PaintImageData,
108 &PaintImageData, 108 &Scroll,
109 &Scroll, 109 &ReplaceContents,
110 &ReplaceContents, 110 &Flush};
111 &Flush
112 };
113 111
114 const PPB_Graphics2D_1_1 g_ppb_graphics2d_thunk_1_1 = { 112 const PPB_Graphics2D_1_1 g_ppb_graphics2d_thunk_1_1 = {&Create,
115 &Create, 113 &IsGraphics2D,
116 &IsGraphics2D, 114 &Describe,
117 &Describe, 115 &PaintImageData,
118 &PaintImageData, 116 &Scroll,
119 &Scroll, 117 &ReplaceContents,
120 &ReplaceContents, 118 &Flush,
121 &Flush, 119 &SetScale,
122 &SetScale, 120 &GetScale};
123 &GetScale
124 };
125 121
126 } // namespace 122 } // namespace
127 123
128 PPAPI_THUNK_EXPORT const PPB_Graphics2D_1_0* GetPPB_Graphics2D_1_0_Thunk() { 124 PPAPI_THUNK_EXPORT const PPB_Graphics2D_1_0* GetPPB_Graphics2D_1_0_Thunk() {
129 return &g_ppb_graphics2d_thunk_1_0; 125 return &g_ppb_graphics2d_thunk_1_0;
130 } 126 }
131 127
132 PPAPI_THUNK_EXPORT const PPB_Graphics2D_1_1* GetPPB_Graphics2D_1_1_Thunk() { 128 PPAPI_THUNK_EXPORT const PPB_Graphics2D_1_1* GetPPB_Graphics2D_1_1_Thunk() {
133 return &g_ppb_graphics2d_thunk_1_1; 129 return &g_ppb_graphics2d_thunk_1_1;
134 } 130 }
135 131
136 } // namespace thunk 132 } // namespace thunk
137 } // namespace ppapi 133 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/thunk/ppb_gamepad_thunk.cc ('k') | ppapi/thunk/ppb_graphics_3d_thunk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698