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

Side by Side Diff: ppapi/proxy/ppb_gles_chromium_texture_mapping_proxy.cc

Issue 6286070: Remove all uses of the global Dispatcher Get function. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 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/proxy/ppb_gles_chromium_texture_mapping_proxy.h" 5 #include "ppapi/proxy/ppb_gles_chromium_texture_mapping_proxy.h"
6 6
7 #include "gpu/command_buffer/client/gles2_implementation.h" 7 #include "gpu/command_buffer/client/gles2_implementation.h"
8 #include "ppapi/c/pp_errors.h" 8 #include "ppapi/c/pp_errors.h"
9 #include "ppapi/c/pp_resource.h" 9 #include "ppapi/c/pp_resource.h"
10 #include "ppapi/c/dev/ppb_gles_chromium_texture_mapping_dev.h" 10 #include "ppapi/c/dev/ppb_gles_chromium_texture_mapping_dev.h"
(...skipping 19 matching lines...) Expand all
30 Context3D* context = PluginResource::GetAs<Context3D>(context_id); 30 Context3D* context = PluginResource::GetAs<Context3D>(context_id);
31 return context->gles2_impl()->MapTexSubImage2DCHROMIUM( 31 return context->gles2_impl()->MapTexSubImage2DCHROMIUM(
32 target, level, xoffset, yoffset, width, height, format, type, access); 32 target, level, xoffset, yoffset, width, height, format, type, access);
33 } 33 }
34 34
35 void UnmapTexSubImage2DCHROMIUM(PP_Resource context_id, const void* mem) { 35 void UnmapTexSubImage2DCHROMIUM(PP_Resource context_id, const void* mem) {
36 Context3D* context = PluginResource::GetAs<Context3D>(context_id); 36 Context3D* context = PluginResource::GetAs<Context3D>(context_id);
37 context->gles2_impl()->UnmapTexSubImage2DCHROMIUM(mem); 37 context->gles2_impl()->UnmapTexSubImage2DCHROMIUM(mem);
38 } 38 }
39 39
40 const struct PPB_GLESChromiumTextureMapping_Dev ppb_gles2_chromium_tm = { 40 const struct PPB_GLESChromiumTextureMapping_Dev gles2_chromium_tm_interface = {
41 MapTexSubImage2DCHROMIUM, 41 MapTexSubImage2DCHROMIUM,
42 UnmapTexSubImage2DCHROMIUM 42 UnmapTexSubImage2DCHROMIUM
43 }; 43 };
44 44
45 InterfaceProxy* CreateGLESChromiumTextureMappingProxy(
46 Dispatcher* dispatcher,
47 const void* target_interface) {
48 return new PPB_GLESChromiumTextureMapping_Proxy(dispatcher, target_interface);
49 }
50
45 } // namespace 51 } // namespace
46 52
47 PPB_GLESChromiumTextureMapping_Proxy::PPB_GLESChromiumTextureMapping_Proxy( 53 PPB_GLESChromiumTextureMapping_Proxy::PPB_GLESChromiumTextureMapping_Proxy(
48 Dispatcher* dispatcher, 54 Dispatcher* dispatcher,
49 const void* target_interface) 55 const void* target_interface)
50 : InterfaceProxy(dispatcher, target_interface) { 56 : InterfaceProxy(dispatcher, target_interface) {
51 } 57 }
52 58
53 PPB_GLESChromiumTextureMapping_Proxy::~PPB_GLESChromiumTextureMapping_Proxy() { 59 PPB_GLESChromiumTextureMapping_Proxy::~PPB_GLESChromiumTextureMapping_Proxy() {
54 } 60 }
55 61
56 const void* PPB_GLESChromiumTextureMapping_Proxy::GetSourceInterface() const { 62 // static
57 return &ppb_gles2_chromium_tm; 63 const InterfaceProxy::Info* PPB_GLESChromiumTextureMapping_Proxy::GetInfo() {
58 } 64 static const Info info = {
59 65 &gles2_chromium_tm_interface,
60 InterfaceID PPB_GLESChromiumTextureMapping_Proxy::GetInterfaceId() const { 66 PPB_GLES_CHROMIUM_TEXTURE_MAPPING_DEV_INTERFACE,
61 return INTERFACE_ID_NONE; 67 INTERFACE_ID_PPB_GLES_CHROMIUM_TM,
68 false,
69 &CreateGLESChromiumTextureMappingProxy,
70 };
71 return &info;
62 } 72 }
63 73
64 bool PPB_GLESChromiumTextureMapping_Proxy::OnMessageReceived( 74 bool PPB_GLESChromiumTextureMapping_Proxy::OnMessageReceived(
65 const IPC::Message& msg) { 75 const IPC::Message& msg) {
66 return false; 76 return false;
67 } 77 }
68 78
69 } // namespace proxy 79 } // namespace proxy
70 } // namespace pp 80 } // namespace pp
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_gles_chromium_texture_mapping_proxy.h ('k') | ppapi/proxy/ppb_graphics_2d_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698