summaryrefslogtreecommitdiffstats
path: root/ppapi
diff options
context:
space:
mode:
authorbbudge@chromium.org <bbudge@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-03 00:49:40 +0000
committerbbudge@chromium.org <bbudge@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-03 00:49:40 +0000
commit163b594a31c5cea4854c8ce0c613069318563576 (patch)
treeb9df5049fa968a524631de69565679c29eb3a1fe /ppapi
parent8df666b5d0c0ff82ebcfeba28da4bcb1d364002e (diff)
downloadchromium_src-163b594a31c5cea4854c8ce0c613069318563576.zip
chromium_src-163b594a31c5cea4854c8ce0c613069318563576.tar.gz
chromium_src-163b594a31c5cea4854c8ce0c613069318563576.tar.bz2
Add PPB_ImageData and PPB_Graphics2D to the untrusted NaCl build of the proxy.
BUG=116317 TEST=compiles Review URL: https://chromiumcodereview.appspot.com/10699066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145230 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi')
-rw-r--r--ppapi/ppapi_proxy.gypi1
-rw-r--r--ppapi/ppapi_shared.gypi1
-rw-r--r--ppapi/proxy/resource_creation_proxy.cc14
-rw-r--r--ppapi/proxy/resource_creation_proxy.h6
-rw-r--r--ppapi/thunk/interfaces_ppb_public_stable.h8
-rw-r--r--ppapi/thunk/resource_creation_api.h6
6 files changed, 17 insertions, 19 deletions
diff --git a/ppapi/ppapi_proxy.gypi b/ppapi/ppapi_proxy.gypi
index 09c5144..e37c45e 100644
--- a/ppapi/ppapi_proxy.gypi
+++ b/ppapi/ppapi_proxy.gypi
@@ -178,7 +178,6 @@
'proxy/ppb_flash_proxy.cc',
'proxy/ppb_flash_menu_proxy.cc',
'proxy/ppb_flash_message_loop_proxy.cc',
- 'proxy/ppb_graphics_2d_proxy.cc',
'proxy/ppb_graphics_3d_proxy.cc',
'proxy/ppb_host_resolver_private_proxy.cc',
'proxy/ppb_network_monitor_private_proxy.cc',
diff --git a/ppapi/ppapi_shared.gypi b/ppapi/ppapi_shared.gypi
index d097037..6a360ca 100644
--- a/ppapi/ppapi_shared.gypi
+++ b/ppapi/ppapi_shared.gypi
@@ -277,7 +277,6 @@
'thunk/ppb_flash_thunk.cc',
'thunk/ppb_flash_message_loop_thunk.cc',
'thunk/ppb_gles_chromium_texture_mapping_thunk.cc',
- 'thunk/ppb_graphics_2d_thunk.cc',
'thunk/ppb_graphics_3d_thunk.cc',
'thunk/ppb_graphics_3d_trusted_thunk.cc',
'thunk/ppb_host_resolver_private_thunk.cc',
diff --git a/ppapi/proxy/resource_creation_proxy.cc b/ppapi/proxy/resource_creation_proxy.cc
index 98f1a45..2bbe21d8 100644
--- a/ppapi/proxy/resource_creation_proxy.cc
+++ b/ppapi/proxy/resource_creation_proxy.cc
@@ -184,6 +184,13 @@ PP_Resource ResourceCreationProxy::CreateImageData(PP_Instance instance,
init_to_zero);
}
+PP_Resource ResourceCreationProxy::CreateGraphics2D(PP_Instance instance,
+ const PP_Size& size,
+ PP_Bool is_always_opaque) {
+ return PPB_Graphics2D_Proxy::CreateProxyResource(instance, size,
+ is_always_opaque);
+}
+
#if !defined(OS_NACL)
PP_Resource ResourceCreationProxy::CreateAudioTrusted(PP_Instance instance) {
// Proxied plugins can't create trusted audio devices.
@@ -253,13 +260,6 @@ PP_Resource ResourceCreationProxy::CreateFlashMessageLoop(
return PPB_Flash_MessageLoop_Proxy::CreateProxyResource(instance);
}
-PP_Resource ResourceCreationProxy::CreateGraphics2D(PP_Instance instance,
- const PP_Size& size,
- PP_Bool is_always_opaque) {
- return PPB_Graphics2D_Proxy::CreateProxyResource(instance, size,
- is_always_opaque);
-}
-
PP_Resource ResourceCreationProxy::CreateHostResolverPrivate(
PP_Instance instance) {
return PPB_HostResolver_Private_Proxy::CreateProxyResource(instance);
diff --git a/ppapi/proxy/resource_creation_proxy.h b/ppapi/proxy/resource_creation_proxy.h
index fcc0780..ddf2b0e 100644
--- a/ppapi/proxy/resource_creation_proxy.h
+++ b/ppapi/proxy/resource_creation_proxy.h
@@ -97,6 +97,9 @@ class ResourceCreationProxy : public InterfaceProxy,
PP_ImageDataFormat format,
const PP_Size& size,
PP_Bool init_to_zero) OVERRIDE;
+ virtual PP_Resource CreateGraphics2D(PP_Instance pp_instance,
+ const PP_Size& size,
+ PP_Bool is_always_opaque) OVERRIDE;
#if !defined(OS_NACL)
virtual PP_Resource CreateAudioTrusted(PP_Instance instance) OVERRIDE;
virtual PP_Resource CreateAudioInput0_1(
@@ -120,9 +123,6 @@ class ResourceCreationProxy : public InterfaceProxy,
virtual PP_Resource CreateFlashMenu(PP_Instance instance,
const PP_Flash_Menu* menu_data) OVERRIDE;
virtual PP_Resource CreateFlashMessageLoop(PP_Instance instance) OVERRIDE;
- virtual PP_Resource CreateGraphics2D(PP_Instance pp_instance,
- const PP_Size& size,
- PP_Bool is_always_opaque) OVERRIDE;
virtual PP_Resource CreateGraphics3D(PP_Instance instance,
PP_Resource share_context,
const int32_t* attrib_list) OVERRIDE;
diff --git a/ppapi/thunk/interfaces_ppb_public_stable.h b/ppapi/thunk/interfaces_ppb_public_stable.h
index 38f60b2..fb803fe 100644
--- a/ppapi/thunk/interfaces_ppb_public_stable.h
+++ b/ppapi/thunk/interfaces_ppb_public_stable.h
@@ -21,6 +21,8 @@ PROXIED_API(PPB_Core)
PROXIED_API(PPB_FileIO)
PROXIED_API(PPB_FileRef)
PROXIED_API(PPB_FileSystem)
+PROXIED_API(PPB_Graphics2D)
+PROXIED_API(PPB_ImageData)
PROXIED_API(PPB_Instance)
PROXIED_API(PPB_URLLoader)
PROXIED_API(PPB_URLResponseInfo)
@@ -30,8 +32,6 @@ PROXIED_API(PPB_Audio)
// AudioConfig isn't proxied in the normal way, we have only local classes and
// serialize it to a struct when we need it on the host side.
UNPROXIED_API(PPB_AudioConfig)
-PROXIED_API(PPB_Graphics2D)
-PROXIED_API(PPB_ImageData)
#endif // !defined(OS_NACL)
// Interfaces
@@ -53,6 +53,8 @@ PROXIED_API(PPB_ImageData)
PROXIED_IFACE(PPB_FileIO, PPB_FILEIO_INTERFACE_1_0, PPB_FileIO_1_0)
PROXIED_IFACE(PPB_FileRef, PPB_FILEREF_INTERFACE_1_0, PPB_FileRef_1_0)
PROXIED_IFACE(PPB_FileSystem, PPB_FILESYSTEM_INTERFACE_1_0, PPB_FileSystem_1_0)
+PROXIED_IFACE(PPB_Graphics2D, PPB_GRAPHICS_2D_INTERFACE_1_0, PPB_Graphics2D_1_0)
+PROXIED_IFACE(PPB_ImageData, PPB_IMAGEDATA_INTERFACE_1_0, PPB_ImageData_1_0)
PROXIED_IFACE(PPB_Instance, PPB_GAMEPAD_INTERFACE_1_0, PPB_Gamepad_1_0)
PROXIED_IFACE(PPB_Instance, PPB_INSTANCE_INTERFACE_1_0, PPB_Instance_1_0)
PROXIED_IFACE(NoAPIName, PPB_INPUT_EVENT_INTERFACE_1_0, PPB_InputEvent_1_0)
@@ -81,9 +83,7 @@ PROXIED_IFACE(PPB_Audio, PPB_AUDIO_INTERFACE_1_0, PPB_Audio_1_0)
// This has no corresponding _Proxy object since it does no IPC.
PROXIED_IFACE(NoAPIName, PPB_AUDIO_CONFIG_INTERFACE_1_0, PPB_AudioConfig_1_0)
PROXIED_IFACE(NoAPIName, PPB_AUDIO_CONFIG_INTERFACE_1_1, PPB_AudioConfig_1_1)
-PROXIED_IFACE(PPB_Graphics2D, PPB_GRAPHICS_2D_INTERFACE_1_0, PPB_Graphics2D_1_0)
PROXIED_IFACE(PPB_Graphics3D, PPB_GRAPHICS_3D_INTERFACE_1_0, PPB_Graphics3D_1_0)
-PROXIED_IFACE(PPB_ImageData, PPB_IMAGEDATA_INTERFACE_1_0, PPB_ImageData_1_0)
PROXIED_IFACE(PPB_Instance, PPB_MOUSECURSOR_INTERFACE_1_0, PPB_MouseCursor_1_0)
#endif // !defined(OS_NACL)
diff --git a/ppapi/thunk/resource_creation_api.h b/ppapi/thunk/resource_creation_api.h
index afdc221..e4ce365 100644
--- a/ppapi/thunk/resource_creation_api.h
+++ b/ppapi/thunk/resource_creation_api.h
@@ -102,6 +102,9 @@ class ResourceCreationAPI {
PP_ImageDataFormat format,
const PP_Size& size,
PP_Bool init_to_zero) = 0;
+ virtual PP_Resource CreateGraphics2D(PP_Instance instance,
+ const PP_Size& size,
+ PP_Bool is_always_opaque) = 0;
#if !defined(OS_NACL)
virtual PP_Resource CreateAudioTrusted(PP_Instance instance) = 0;
virtual PP_Resource CreateAudioInput0_1(
@@ -124,9 +127,6 @@ class ResourceCreationAPI {
virtual PP_Resource CreateFlashMenu(PP_Instance instance,
const PP_Flash_Menu* menu_data) = 0;
virtual PP_Resource CreateFlashMessageLoop(PP_Instance instance) = 0;
- virtual PP_Resource CreateGraphics2D(PP_Instance instance,
- const PP_Size& size,
- PP_Bool is_always_opaque) = 0;
virtual PP_Resource CreateGraphics3D(PP_Instance instance,
PP_Resource share_context,
const int32_t* attrib_list) = 0;