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

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

Issue 7206016: Convert most remaining resources to use the API/thunk system. The significant (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "ppapi/thunk/thunk.h"
6 #include "ppapi/thunk/enter.h"
7 #include "ppapi/thunk/ppb_context_3d_api.h"
8 #include "ppapi/thunk/resource_creation_api.h"
9
10 namespace ppapi {
11 namespace thunk {
12
13 namespace {
14
15 typedef EnterResource<PPB_Context3D_API> EnterContext3D;
16
17 void* MapTexSubImage2DCHROMIUM(PP_Resource context,
18 GLenum target,
19 GLint level,
20 GLint xoffset,
21 GLint yoffset,
22 GLsizei width,
23 GLsizei height,
24 GLenum format,
25 GLenum type,
26 GLenum access) {
27 EnterContext3D enter(context, true);
28 if (enter.failed())
29 return NULL;
30 return enter.object()->MapTexSubImage2DCHROMIUM(
31 target, level, xoffset, yoffset, width, height, format, type, access);
32 }
33
34 void UnmapTexSubImage2DCHROMIUM(PP_Resource context, const void* mem) {
35 EnterContext3D enter(context, true);
36 if (enter.succeeded())
37 enter.object()->UnmapTexSubImage2DCHROMIUM(mem);
38 }
39
40 const PPB_GLESChromiumTextureMapping_Dev
41 g_ppb_gles_chromium_texture_mapping_thunk = {
42 &MapTexSubImage2DCHROMIUM,
43 &UnmapTexSubImage2DCHROMIUM
44 };
45
46 } // namespace
47
48 const PPB_GLESChromiumTextureMapping_Dev*
49 GetPPB_GLESChromiumTextureMapping_Thunk() {
50 return &g_ppb_gles_chromium_texture_mapping_thunk;
51 }
52
53 } // namespace thunk
54 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698