diff options
author | nfullagar@google.com <nfullagar@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-07 17:10:46 +0000 |
---|---|---|
committer | nfullagar@google.com <nfullagar@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-07 17:10:46 +0000 |
commit | fae0e947dd72d6499abcd4cc9d8a2c988802ecc7 (patch) | |
tree | 64894d705184fa15943381a1a083cd4a82e242a0 /ppapi | |
parent | 29ee58a0ca74da203815ffc416e0b52cafb9c79e (diff) | |
download | chromium_src-fae0e947dd72d6499abcd4cc9d8a2c988802ecc7.zip chromium_src-fae0e947dd72d6499abcd4cc9d8a2c988802ecc7.tar.gz chromium_src-fae0e947dd72d6499abcd4cc9d8a2c988802ecc7.tar.bz2 |
reconstitute moving 3d out of dev CL. (previous attempt was reverted)
previous CL: http://codereview.chromium.org/7737013/
BUG= http://code.google.com/p/chromium/issues/detail?id=94320
TEST= try bots, manual testing
Review URL: http://codereview.chromium.org/7837018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99968 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi')
56 files changed, 390 insertions, 308 deletions
diff --git a/ppapi/c/dev/pp_video_dev.h b/ppapi/c/dev/pp_video_dev.h index 7b54f9d..04e8643 100644 --- a/ppapi/c/dev/pp_video_dev.h +++ b/ppapi/c/dev/pp_video_dev.h @@ -5,13 +5,13 @@ #ifndef PPAPI_C_DEV_PP_VIDEO_DEV_H_ #define PPAPI_C_DEV_PP_VIDEO_DEV_H_ -#include "ppapi/c/dev/ppb_opengles_dev.h" #include "ppapi/c/pp_bool.h" #include "ppapi/c/pp_instance.h" #include "ppapi/c/pp_macros.h" #include "ppapi/c/pp_resource.h" #include "ppapi/c/pp_size.h" #include "ppapi/c/pp_stdint.h" +#include "ppapi/c/ppb_opengles.h" // Video decoder configuration-related enums. diff --git a/ppapi/c/dev/ppb_context_3d_dev.h b/ppapi/c/dev/ppb_context_3d_dev.h index 4bd13e7..447cdfa 100644 --- a/ppapi/c/dev/ppb_context_3d_dev.h +++ b/ppapi/c/dev/ppb_context_3d_dev.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010 The Chromium Authors. All rights reserved. +/* Copyright (c) 2011 The Chromium Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ @@ -6,9 +6,8 @@ #ifndef PPAPI_C_DEV_PPB_CONTEXT_3D_DEV_H_ #define PPAPI_C_DEV_PPB_CONTEXT_3D_DEV_H_ -#include "ppapi/c/dev/pp_graphics_3d_dev.h" - #include "ppapi/c/pp_bool.h" +#include "ppapi/c/pp_graphics_3d.h" #include "ppapi/c/pp_instance.h" #include "ppapi/c/pp_resource.h" diff --git a/ppapi/c/dev/ppb_gles_chromium_texture_mapping_dev.h b/ppapi/c/dev/ppb_gles_chromium_texture_mapping_dev.h index cc13b6d..bba6826 100644 --- a/ppapi/c/dev/ppb_gles_chromium_texture_mapping_dev.h +++ b/ppapi/c/dev/ppb_gles_chromium_texture_mapping_dev.h @@ -6,7 +6,7 @@ #define PPAPI_C_DEV_PPB_GLES_CHROMIUM_TEXTURE_MAPPING_DEV_H_ #include "ppapi/c/pp_resource.h" -#include "ppapi/c/dev/ppb_opengles_dev.h" +#include "ppapi/c/ppb_opengles.h" #define PPB_GLES_CHROMIUM_TEXTURE_MAPPING_DEV_INTERFACE_0_1 \ "PPB_GLESChromiumTextureMapping(Dev);0.1" diff --git a/ppapi/c/dev/ppb_surface_3d_dev.h b/ppapi/c/dev/ppb_surface_3d_dev.h index 47b47ef..c89d721 100644 --- a/ppapi/c/dev/ppb_surface_3d_dev.h +++ b/ppapi/c/dev/ppb_surface_3d_dev.h @@ -6,8 +6,8 @@ #ifndef PPAPI_C_DEV_PPB_SURFACE_3D_DEV_H_ #define PPAPI_C_DEV_PPB_SURFACE_3D_DEV_H_ -#include "ppapi/c/dev/pp_graphics_3d_dev.h" #include "ppapi/c/pp_bool.h" +#include "ppapi/c/pp_graphics_3d.h" #include "ppapi/c/pp_completion_callback.h" #include "ppapi/c/pp_instance.h" #include "ppapi/c/pp_resource.h" diff --git a/ppapi/c/dev/ppp_graphics_3d_dev.h b/ppapi/c/dev/ppp_graphics_3d_dev.h deleted file mode 100644 index ae9b2e1..0000000 --- a/ppapi/c/dev/ppp_graphics_3d_dev.h +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright (c) 2010 The Chromium Authors. All rights reserved. - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ -#ifndef PPAPI_C_DEV_PPP_GRAPHICS_3D_DEV_H_ -#define PPAPI_C_DEV_PPP_GRAPHICS_3D_DEV_H_ - -#include "ppapi/c/pp_instance.h" - -#define PPP_GRAPHICS_3D_DEV_INTERFACE "PPP_Graphics_3D(Dev);0.2" - -struct PPP_Graphics3D_Dev { - // Called when the OpenGL ES window is invalidated and needs to be repainted. - void (*Graphics3DContextLost)(PP_Instance instance); -}; - -#endif /* PPAPI_C_DEV_PPP_GRAPHICS_3D_DEV_H_ */ - diff --git a/ppapi/c/dev/pp_graphics_3d_dev.h b/ppapi/c/pp_graphics_3d.h index 300f110..06886f8 100644 --- a/ppapi/c/dev/pp_graphics_3d_dev.h +++ b/ppapi/c/pp_graphics_3d.h @@ -3,12 +3,12 @@ * found in the LICENSE file. */ -#ifndef PPAPI_C_DEV_PP_GRAPHICS_3D_DEV_H_ -#define PPAPI_C_DEV_PP_GRAPHICS_3D_DEV_H_ +#ifndef PPAPI_C_PP_GRAPHICS_3D_H_ +#define PPAPI_C_PP_GRAPHICS_3D_H_ #include "ppapi/c/pp_stdint.h" -enum PP_Graphics3DAttrib_Dev { +enum PP_Graphics3DAttrib { // Bits of Alpha in the color buffer. PP_GRAPHICS3DATTRIB_ALPHA_SIZE = 0x3021, // Bits of Blue in the color buffer. @@ -45,4 +45,4 @@ enum PP_Graphics3DAttrib_Dev { // are deprecated. typedef int32_t PP_Config3D_Dev; -#endif // PPAPI_C_DEV_PP_GRAPHICS_3D_DEV_H_ +#endif // PPAPI_C_PP_GRAPHICS_3D_H_ diff --git a/ppapi/c/dev/ppb_graphics_3d_dev.h b/ppapi/c/ppb_graphics_3d.h index 28c759c..ef93402 100644 --- a/ppapi/c/dev/ppb_graphics_3d_dev.h +++ b/ppapi/c/ppb_graphics_3d.h @@ -2,10 +2,10 @@ * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ -#ifndef PPAPI_C_DEV_PPB_GRAPHICS_3D_DEV_H_ -#define PPAPI_C_DEV_PPB_GRAPHICS_3D_DEV_H_ +#ifndef PPAPI_C_PPB_GRAPHICS_3D_H_ +#define PPAPI_C_PPB_GRAPHICS_3D_H_ -#include "ppapi/c/dev/pp_graphics_3d_dev.h" +#include "ppapi/c/pp_graphics_3d.h" #include "ppapi/c/pp_bool.h" #include "ppapi/c/pp_instance.h" @@ -28,10 +28,10 @@ // // Shutdown. // core->ReleaseResource(context); -#define PPB_GRAPHICS_3D_DEV_INTERFACE_0_9 "PPB_Graphics3D(Dev);0.9" -#define PPB_GRAPHICS_3D_DEV_INTERFACE PPB_GRAPHICS_3D_DEV_INTERFACE_0_9 +#define PPB_GRAPHICS_3D_INTERFACE_1_0 "PPB_Graphics3D;1.0" +#define PPB_GRAPHICS_3D_INTERFACE PPB_GRAPHICS_3D_INTERFACE_1_0 -struct PPB_Graphics3D_Dev { +struct PPB_Graphics3D { // Retrieves the maximum supported value for the given attribute. // // This function may be used to check if a particular attribute value is @@ -201,4 +201,4 @@ struct PPB_Graphics3D_Dev { struct PP_CompletionCallback callback); }; -#endif /* PPAPI_C_DEV_PPB_GRAPHICS_3D_DEV_H_ */ +#endif /* PPAPI_C_PPB_GRAPHICS_3D_H_ */ diff --git a/ppapi/c/dev/ppb_opengles_dev.h b/ppapi/c/ppb_opengles.h index 3e19134..2d6923e 100644 --- a/ppapi/c/dev/ppb_opengles_dev.h +++ b/ppapi/c/ppb_opengles.h @@ -5,8 +5,8 @@ // This file is auto-generated. DO NOT EDIT! // OpenGL ES interface. -#ifndef PPAPI_C_DEV_PPB_OPENGLES_DEV_H_ -#define PPAPI_C_DEV_PPB_OPENGLES_DEV_H_ +#ifndef PPAPI_C_PPB_OPENGLES_H_ +#define PPAPI_C_PPB_OPENGLES_H_ #include "ppapi/c/pp_resource.h" #include "ppapi/c/pp_stdint.h" @@ -31,13 +31,10 @@ typedef unsigned short GLushort; typedef int GLclampx; #endif // __gl2_h_ -// TODO(brettw) this string should be PPB_OpenGLES2;1.0 when this is frozen. -// The 2.0 is trying to describe the version of OpenGL ES which is different -// than the Pepper interface version. -#define PPB_OPENGLES2_DEV_INTERFACE_0_1 "PPB_OpenGLES(Dev);2.0" -#define PPB_OPENGLES2_DEV_INTERFACE PPB_OPENGLES2_DEV_INTERFACE_0_1 +#define PPB_OPENGLES2_INTERFACE_1_0 "PPB_OpenGLES2;1.0" +#define PPB_OPENGLES2_INTERFACE PPB_OPENGLES2_INTERFACE_1_0 -struct PPB_OpenGLES2_Dev { +struct PPB_OpenGLES2 { void (*ActiveTexture)(PP_Resource context, GLenum texture); void (*AttachShader)(PP_Resource context, GLuint program, GLuint shader); void (*BindAttribLocation)( @@ -304,5 +301,5 @@ struct PPB_OpenGLES2_Dev { PP_Resource context, GLint x, GLint y, GLsizei width, GLsizei height); }; -#endif // PPAPI_C_DEV_PPB_OPENGLES_DEV_H_ +#endif // PPAPI_C_PPB_OPENGLES_H_ diff --git a/ppapi/c/ppp_graphics_3d.h b/ppapi/c/ppp_graphics_3d.h new file mode 100644 index 0000000..9916770 --- /dev/null +++ b/ppapi/c/ppp_graphics_3d.h @@ -0,0 +1,18 @@ +/* Copyright (c) 2011 The Chromium Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ +#ifndef PPAPI_C_PPP_GRAPHICS_3D_H_ +#define PPAPI_C_PPP_GRAPHICS_3D_H_ + +#include "ppapi/c/pp_instance.h" + +#define PPP_GRAPHICS_3D_INTERFACE "PPP_Graphics_3D;1.0" + +struct PPP_Graphics3D { + // Called when the OpenGL ES window is invalidated and needs to be repainted. + void (*Graphics3DContextLost)(PP_Instance instance); +}; + +#endif /* PPAPI_C_PPP_GRAPHICS_3D_H_ */ + diff --git a/ppapi/c/dev/ppb_graphics_3d_trusted_dev.h b/ppapi/c/trusted/ppb_graphics_3d_trusted.h index c82f345..1be88c4 100644 --- a/ppapi/c/dev/ppb_graphics_3d_trusted_dev.h +++ b/ppapi/c/trusted/ppb_graphics_3d_trusted.h @@ -2,18 +2,18 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef PPAPI_C_DEV_PPB_GRAPHICS_3D_TRUSTED_DEV_H_ -#define PPAPI_C_DEV_PPB_GRAPHICS_3D_TRUSTED_DEV_H_ +#ifndef PPAPI_C_TRUSTED_PPB_GRAPHICS_3D_TRUSTED_H_ +#define PPAPI_C_TRUSTED_PPB_GRAPHICS_3D_TRUSTED_H_ #include "ppapi/c/pp_bool.h" #include "ppapi/c/pp_instance.h" #include "ppapi/c/pp_resource.h" #include "ppapi/c/pp_stdint.h" -#define PPB_GRAPHICS_3D_TRUSTED_DEV_INTERFACE_0_1 \ - "PPB_Graphics3DTrusted(Dev);0.1" -#define PPB_GRAPHICS_3D_TRUSTED_DEV_INTERFACE \ - PPB_GRAPHICS_3D_TRUSTED_DEV_INTERFACE_0_1 +#define PPB_GRAPHICS_3D_TRUSTED_INTERFACE_0_1 \ + "PPB_Graphics3DTrusted;0.1" +#define PPB_GRAPHICS_3D_TRUSTED_INTERFACE \ + PPB_GRAPHICS_3D_TRUSTED_INTERFACE_0_1 typedef enum { PPB_GRAPHICS3D_TRUSTED_ERROR_OK, @@ -51,7 +51,7 @@ struct PP_Graphics3DTrustedState { uint32_t generation; }; -struct PPB_Graphics3DTrusted_Dev { +struct PPB_Graphics3DTrusted { // Creates a raw Graphics3D resource. A raw Graphics3D is intended to be used // with the trusted interface, through the command buffer (for proxying). PP_Resource (*CreateRaw)(PP_Instance instance_id, @@ -99,5 +99,5 @@ struct PPB_Graphics3DTrusted_Dev { int32_t last_known_get); }; -#endif // PPAPI_C_DEV_PPB_GRAPHICS_3D_TRUSTED_DEV_H_ +#endif // PPAPI_C_TRUSTED_PPB_GRAPHICS_3D_TRUSTED_H_ diff --git a/ppapi/cpp/dev/graphics_3d_dev.cc b/ppapi/cpp/dev/graphics_3d_dev.cc deleted file mode 100644 index 953b859..0000000 --- a/ppapi/cpp/dev/graphics_3d_dev.cc +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "ppapi/cpp/dev/graphics_3d_dev.h" - -#include "ppapi/c/pp_errors.h" -#include "ppapi/cpp/completion_callback.h" -#include "ppapi/cpp/instance.h" -#include "ppapi/cpp/module_impl.h" -#include "ppapi/cpp/var.h" - -namespace pp { - -namespace { - -template <> const char* interface_name<PPB_Graphics3D_Dev>() { - return PPB_GRAPHICS_3D_DEV_INTERFACE; -} - -} // namespace - -Graphics3D_Dev::Graphics3D_Dev() { -} - -Graphics3D_Dev::Graphics3D_Dev(const Instance& instance, - const Graphics3D_Dev& share_context, - const int32_t* attrib_list) { - if (has_interface<PPB_Graphics3D_Dev>()) { - PassRefFromConstructor(get_interface<PPB_Graphics3D_Dev>()->Create( - instance.pp_instance(), - share_context.pp_resource(), - attrib_list)); - } -} - -Graphics3D_Dev::~Graphics3D_Dev() { -} - -int32_t Graphics3D_Dev::GetAttribs(int32_t* attrib_list) const { - if (!has_interface<PPB_Graphics3D_Dev>()) - return PP_ERROR_NOINTERFACE; - - return get_interface<PPB_Graphics3D_Dev>()->GetAttribs( - pp_resource(), - attrib_list); -} - -int32_t Graphics3D_Dev::SetAttribs(int32_t* attrib_list) { - if (!has_interface<PPB_Graphics3D_Dev>()) - return PP_ERROR_NOINTERFACE; - - return get_interface<PPB_Graphics3D_Dev>()->SetAttribs( - pp_resource(), - attrib_list); -} - -int32_t Graphics3D_Dev::ResizeBuffers(int32_t width, int32_t height) { - if (!has_interface<PPB_Graphics3D_Dev>()) - return PP_ERROR_NOINTERFACE; - - return get_interface<PPB_Graphics3D_Dev>()->ResizeBuffers( - pp_resource(), width, height); -} - -int32_t Graphics3D_Dev::SwapBuffers(const CompletionCallback& cc) { - if (!has_interface<PPB_Graphics3D_Dev>()) - return PP_ERROR_NOINTERFACE; - - return get_interface<PPB_Graphics3D_Dev>()->SwapBuffers( - pp_resource(), - cc.pp_completion_callback()); -} - -} // namespace pp - diff --git a/ppapi/cpp/dev/video_decoder_dev.cc b/ppapi/cpp/dev/video_decoder_dev.cc index f7ab651..991ad55 100644 --- a/ppapi/cpp/dev/video_decoder_dev.cc +++ b/ppapi/cpp/dev/video_decoder_dev.cc @@ -8,7 +8,7 @@ #include "ppapi/c/dev/ppp_video_decoder_dev.h" #include "ppapi/c/pp_errors.h" #include "ppapi/cpp/dev/context_3d_dev.h" -#include "ppapi/cpp/dev/graphics_3d_dev.h" +#include "ppapi/cpp/graphics_3d.h" #include "ppapi/cpp/instance.h" #include "ppapi/cpp/module.h" #include "ppapi/cpp/module_impl.h" @@ -33,7 +33,7 @@ VideoDecoder_Dev::VideoDecoder_Dev(const Instance* instance, } VideoDecoder_Dev::VideoDecoder_Dev(const Instance* instance, - const Graphics3D_Dev& context, + const Graphics3D& context, PP_VideoDecoder_Profile profile) { if (!has_interface<PPB_VideoDecoder_Dev>()) return; diff --git a/ppapi/cpp/dev/video_decoder_dev.h b/ppapi/cpp/dev/video_decoder_dev.h index e260050..b761ef1 100644 --- a/ppapi/cpp/dev/video_decoder_dev.h +++ b/ppapi/cpp/dev/video_decoder_dev.h @@ -15,7 +15,7 @@ namespace pp { class Context3D_Dev; -class Graphics3D_Dev; +class Graphics3D; class Instance; // C++ wrapper for the Pepper Video Decoder interface. For more detailed @@ -29,7 +29,7 @@ class VideoDecoder_Dev : public Resource { const Context3D_Dev& context, PP_VideoDecoder_Profile profile); VideoDecoder_Dev(const Instance* instance, - const Graphics3D_Dev& context, + const Graphics3D& context, PP_VideoDecoder_Profile profile); explicit VideoDecoder_Dev(PP_Resource resource); diff --git a/ppapi/cpp/graphics_3d.cc b/ppapi/cpp/graphics_3d.cc new file mode 100644 index 0000000..0cd8ba2 --- /dev/null +++ b/ppapi/cpp/graphics_3d.cc @@ -0,0 +1,76 @@ +// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ppapi/cpp/graphics_3d.h" + +#include "ppapi/c/pp_errors.h" +#include "ppapi/cpp/completion_callback.h" +#include "ppapi/cpp/instance.h" +#include "ppapi/cpp/module_impl.h" +#include "ppapi/cpp/var.h" + +namespace pp { + +namespace { + +template <> const char* interface_name<PPB_Graphics3D>() { + return PPB_GRAPHICS_3D_INTERFACE; +} + +} // namespace + +Graphics3D::Graphics3D() { +} + +Graphics3D::Graphics3D(const Instance& instance, + const Graphics3D& share_context, + const int32_t* attrib_list) { + if (has_interface<PPB_Graphics3D>()) { + PassRefFromConstructor(get_interface<PPB_Graphics3D>()->Create( + instance.pp_instance(), + share_context.pp_resource(), + attrib_list)); + } +} + +Graphics3D::~Graphics3D() { +} + +int32_t Graphics3D::GetAttribs(int32_t* attrib_list) const { + if (!has_interface<PPB_Graphics3D>()) + return PP_ERROR_NOINTERFACE; + + return get_interface<PPB_Graphics3D>()->GetAttribs( + pp_resource(), + attrib_list); +} + +int32_t Graphics3D::SetAttribs(int32_t* attrib_list) { + if (!has_interface<PPB_Graphics3D>()) + return PP_ERROR_NOINTERFACE; + + return get_interface<PPB_Graphics3D>()->SetAttribs( + pp_resource(), + attrib_list); +} + +int32_t Graphics3D::ResizeBuffers(int32_t width, int32_t height) { + if (!has_interface<PPB_Graphics3D>()) + return PP_ERROR_NOINTERFACE; + + return get_interface<PPB_Graphics3D>()->ResizeBuffers( + pp_resource(), width, height); +} + +int32_t Graphics3D::SwapBuffers(const CompletionCallback& cc) { + if (!has_interface<PPB_Graphics3D>()) + return PP_ERROR_NOINTERFACE; + + return get_interface<PPB_Graphics3D>()->SwapBuffers( + pp_resource(), + cc.pp_completion_callback()); +} + +} // namespace pp + diff --git a/ppapi/cpp/dev/graphics_3d_dev.h b/ppapi/cpp/graphics_3d.h index 30a46e7..aaa6d08 100644 --- a/ppapi/cpp/dev/graphics_3d_dev.h +++ b/ppapi/cpp/graphics_3d.h @@ -2,10 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef PPAPI_CPP_DEV_GRAPHICS_3D_DEV_H_ -#define PPAPI_CPP_DEV_GRAPHICS_3D_DEV_H_ +#ifndef PPAPI_CPP_GRAPHICS_3D_H_ +#define PPAPI_CPP_GRAPHICS_3D_H_ -#include "ppapi/c/dev/ppb_graphics_3d_dev.h" +#include "ppapi/c/ppb_graphics_3d.h" #include "ppapi/cpp/resource.h" namespace pp { @@ -14,16 +14,16 @@ class CompletionCallback; class Instance; class Var; -class Graphics3D_Dev : public Resource { +class Graphics3D : public Resource { public: // Creates an is_null() Graphics3D_Dev object. - Graphics3D_Dev(); + Graphics3D(); - Graphics3D_Dev(const Instance& instance, - const Graphics3D_Dev& share_context, - const int32_t* attrib_list); + Graphics3D(const Instance& instance, + const Graphics3D& share_context, + const int32_t* attrib_list); - ~Graphics3D_Dev(); + ~Graphics3D(); int32_t GetAttribs(int32_t* attrib_list) const; int32_t SetAttribs(int32_t* attrib_list); @@ -35,5 +35,5 @@ class Graphics3D_Dev : public Resource { } // namespace pp -#endif // PPAPI_CPP_DEV_GRAPHICS_3D_DEV_H_ +#endif // PPAPI_CPP_GRAPHICS_3D_H_ diff --git a/ppapi/cpp/dev/graphics_3d_client_dev.cc b/ppapi/cpp/graphics_3d_client.cc index bdd2e7e..d827f9d 100644 --- a/ppapi/cpp/dev/graphics_3d_client_dev.cc +++ b/ppapi/cpp/graphics_3d_client.cc @@ -1,10 +1,10 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ppapi/cpp/dev/graphics_3d_client_dev.h" +#include "ppapi/cpp/graphics_3d_client.h" -#include "ppapi/c/dev/ppp_graphics_3d_dev.h" +#include "ppapi/c/ppp_graphics_3d.h" #include "ppapi/cpp/instance.h" #include "ppapi/cpp/module.h" #include "ppapi/cpp/module_impl.h" @@ -13,30 +13,30 @@ namespace pp { namespace { -const char kPPPGraphics3DInterface[] = PPP_GRAPHICS_3D_DEV_INTERFACE; +const char kPPPGraphics3DInterface[] = PPP_GRAPHICS_3D_INTERFACE; void Graphics3D_ContextLost(PP_Instance instance) { void* object = pp::Instance::GetPerInstanceObject(instance, kPPPGraphics3DInterface); if (!object) return; - return static_cast<Graphics3DClient_Dev*>(object)->Graphics3DContextLost(); + return static_cast<Graphics3DClient*>(object)->Graphics3DContextLost(); } -static PPP_Graphics3D_Dev graphics3d_interface = { +static PPP_Graphics3D graphics3d_interface = { &Graphics3D_ContextLost, }; } // namespace -Graphics3DClient_Dev::Graphics3DClient_Dev(Instance* instance) +Graphics3DClient::Graphics3DClient(Instance* instance) : associated_instance_(instance) { pp::Module::Get()->AddPluginInterface(kPPPGraphics3DInterface, &graphics3d_interface); associated_instance_->AddPerInstanceObject(kPPPGraphics3DInterface, this); } -Graphics3DClient_Dev::~Graphics3DClient_Dev() { +Graphics3DClient::~Graphics3DClient() { associated_instance_->RemovePerInstanceObject(kPPPGraphics3DInterface, this); } diff --git a/ppapi/cpp/dev/graphics_3d_client_dev.h b/ppapi/cpp/graphics_3d_client.h index 5f68fb2..511ca2d 100644 --- a/ppapi/cpp/dev/graphics_3d_client_dev.h +++ b/ppapi/cpp/graphics_3d_client.h @@ -1,9 +1,9 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef PPAPI_CPP_DEV_GRAPHICS_3D_CLIENT_DEV_H_ -#define PPAPI_CPP_DEV_GRAPHICS_3D_CLIENT_DEV_H_ +#ifndef PPAPI_CPP_GRAPHICS_3D_CLIENT_H_ +#define PPAPI_CPP_GRAPHICS_3D_CLIENT_H_ #include "ppapi/c/pp_stdint.h" @@ -17,10 +17,10 @@ class Widget_Dev; // This class provides a C++ interface for callbacks related to 3D. You // would normally use multiple inheritance to derive from this class in your // instance. -class Graphics3DClient_Dev { +class Graphics3DClient { public: - Graphics3DClient_Dev(Instance* instance); - virtual ~Graphics3DClient_Dev(); + Graphics3DClient(Instance* instance); + virtual ~Graphics3DClient(); /** * Notification that the context was lost for the 3D devices. @@ -33,4 +33,4 @@ class Graphics3DClient_Dev { } // namespace pp -#endif // PPAPI_CPP_DEV_GRAPHICS_3D_CLIENT_DEV_H_ +#endif // PPAPI_CPP_DEV_GRAPHICS_3D_CLIENT_H_ diff --git a/ppapi/cpp/instance.cc b/ppapi/cpp/instance.cc index 9bb77dc..a6f5997 100644 --- a/ppapi/cpp/instance.cc +++ b/ppapi/cpp/instance.cc @@ -8,9 +8,9 @@ #include "ppapi/c/ppb_input_event.h" #include "ppapi/c/ppb_instance.h" #include "ppapi/c/ppb_messaging.h" -#include "ppapi/cpp/dev/graphics_3d_dev.h" #include "ppapi/cpp/dev/surface_3d_dev.h" #include "ppapi/cpp/graphics_2d.h" +#include "ppapi/cpp/graphics_3d.h" #include "ppapi/cpp/image_data.h" #include "ppapi/cpp/logging.h" #include "ppapi/cpp/module.h" @@ -82,7 +82,7 @@ bool Instance::BindGraphics(const Graphics2D& graphics) { pp_instance(), graphics.pp_resource())); } -bool Instance::BindGraphics(const Graphics3D_Dev& graphics) { +bool Instance::BindGraphics(const Graphics3D& graphics) { if (!has_interface<PPB_Instance>()) return false; return PP_ToBool(get_interface<PPB_Instance>()->BindGraphics( diff --git a/ppapi/cpp/instance.h b/ppapi/cpp/instance.h index ea145f9..528c08a 100644 --- a/ppapi/cpp/instance.h +++ b/ppapi/cpp/instance.h @@ -21,7 +21,7 @@ struct PP_InputEvent; namespace pp { class Graphics2D; -class Graphics3D_Dev; +class Graphics3D; class InputEvent; class ImageData; class Point; @@ -275,12 +275,12 @@ class Instance { /// Refer to <code>BindGraphics(const Graphics2D& graphics)</code> for /// further information. /// - /// @param[in] graphics A <code>Graphics3D_Dev</code> to bind. + /// @param[in] graphics A <code>Graphics3D</code> to bind. /// /// @return true if bind was successful or false if the device was not the /// correct type. On success, a reference to the device will be held by the /// instance, so the caller can release its reference if it chooses. - bool BindGraphics(const Graphics3D_Dev& graphics); + bool BindGraphics(const Graphics3D& graphics); /// Binds the given Surface3D as the current display surface. /// Refer to <code>BindGraphics(const Graphics2D& graphics)</code> for diff --git a/ppapi/examples/gles2/gles2.cc b/ppapi/examples/gles2/gles2.cc index 26d94a4..04f31f7 100644 --- a/ppapi/examples/gles2/gles2.cc +++ b/ppapi/examples/gles2/gles2.cc @@ -12,14 +12,14 @@ #include <vector> #include "ppapi/c/dev/ppb_console_dev.h" -#include "ppapi/c/dev/ppb_opengles_dev.h" #include "ppapi/c/pp_errors.h" +#include "ppapi/c/ppb_opengles.h" #include "ppapi/cpp/dev/context_3d_dev.h" -#include "ppapi/cpp/dev/graphics_3d_client_dev.h" -#include "ppapi/cpp/dev/graphics_3d_dev.h" #include "ppapi/cpp/dev/surface_3d_dev.h" #include "ppapi/cpp/dev/video_decoder_client_dev.h" #include "ppapi/cpp/dev/video_decoder_dev.h" +#include "ppapi/cpp/graphics_3d.h" +#include "ppapi/cpp/graphics_3d_client.h" #include "ppapi/cpp/instance.h" #include "ppapi/cpp/module.h" #include "ppapi/cpp/rect.h" @@ -41,7 +41,7 @@ namespace { class GLES2DemoInstance : public pp::Instance, - public pp::Graphics3DClient_Dev, + public pp::Graphics3DClient, public pp::VideoDecoderClient_Dev { public: GLES2DemoInstance(PP_Instance instance, pp::Module* module); @@ -51,7 +51,7 @@ class GLES2DemoInstance : public pp::Instance, virtual void DidChangeView(const pp::Rect& position, const pp::Rect& clip_ignored); - // pp::Graphics3DClient_Dev implementation. + // pp::Graphics3DClient implementation. virtual void Graphics3DContextLost() { // TODO(vrk/fischman): Properly reset after a lost graphics context. In // particular need to delete context_ & surface_ and re-create textures. @@ -159,7 +159,7 @@ class GLES2DemoInstance : public pp::Instance, // Unowned pointers. const struct PPB_Console_Dev* console_if_; const struct PPB_Core* core_if_; - const struct PPB_OpenGLES2_Dev* gles2_if_; + const struct PPB_OpenGLES2* gles2_if_; // Owned data. pp::Context3D_Dev* context_; @@ -193,7 +193,7 @@ GLES2DemoInstance::DecoderClient::~DecoderClient() { } GLES2DemoInstance::GLES2DemoInstance(PP_Instance instance, pp::Module* module) - : pp::Instance(instance), pp::Graphics3DClient_Dev(this), + : pp::Instance(instance), pp::Graphics3DClient(this), pp::VideoDecoderClient_Dev(this), num_frames_rendered_(0), first_frame_delivered_ticks_(-1), @@ -205,8 +205,8 @@ GLES2DemoInstance::GLES2DemoInstance(PP_Instance instance, pp::Module* module) module->GetBrowserInterface(PPB_CONSOLE_DEV_INTERFACE)))); assert((core_if_ = static_cast<const struct PPB_Core*>( module->GetBrowserInterface(PPB_CORE_INTERFACE)))); - assert((gles2_if_ = static_cast<const struct PPB_OpenGLES2_Dev*>( - module->GetBrowserInterface(PPB_OPENGLES2_DEV_INTERFACE)))); + assert((gles2_if_ = static_cast<const struct PPB_OpenGLES2*>( + module->GetBrowserInterface(PPB_OPENGLES2_INTERFACE)))); } GLES2DemoInstance::~GLES2DemoInstance() { diff --git a/ppapi/lib/gl/gles2/gl2ext_ppapi.c b/ppapi/lib/gl/gles2/gl2ext_ppapi.c index 02e3005..62d842d 100644 --- a/ppapi/lib/gl/gles2/gl2ext_ppapi.c +++ b/ppapi/lib/gl/gles2/gl2ext_ppapi.c @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -25,7 +25,7 @@ // TODO(alokp): This will need to be thread-safe if we build gles2 as a // shared library. -static const struct PPB_OpenGLES2_Dev* g_gles2_interface = NULL; +static const struct PPB_OpenGLES2* g_gles2_interface = NULL; // TODO(alokp): Make sure PP_TLS works on all supported platforms. static PP_TLS PP_Resource g_current_context = 0; @@ -33,7 +33,7 @@ static PP_TLS PP_Resource g_current_context = 0; GLboolean GL_APIENTRY glInitializePPAPI( PPB_GetInterface get_browser_interface) { if (!g_gles2_interface) { - g_gles2_interface = get_browser_interface(PPB_OPENGLES2_DEV_INTERFACE); + g_gles2_interface = get_browser_interface(PPB_OPENGLES2_INTERFACE); } return g_gles2_interface ? GL_TRUE : GL_FALSE; } @@ -51,7 +51,7 @@ PP_Resource GL_APIENTRY glGetCurrentContextPPAPI() { return g_current_context; } -const struct PPB_OpenGLES2_Dev* GL_APIENTRY glGetInterfacePPAPI() { +const struct PPB_OpenGLES2* GL_APIENTRY glGetInterfacePPAPI() { return g_gles2_interface; } diff --git a/ppapi/lib/gl/gles2/gl2ext_ppapi.h b/ppapi/lib/gl/gles2/gl2ext_ppapi.h index 97953ce..7c84397 100644 --- a/ppapi/lib/gl/gles2/gl2ext_ppapi.h +++ b/ppapi/lib/gl/gles2/gl2ext_ppapi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -11,7 +11,7 @@ #include "ppapi/c/pp_resource.h" #include "ppapi/c/ppb.h" -#include "ppapi/c/dev/ppb_opengles_dev.h" +#include "ppapi/c/ppb_opengles.h" #ifdef __cplusplus extern "C" { @@ -35,7 +35,7 @@ GL_APICALL void GL_APIENTRY glSetCurrentContextPPAPI(PP_Resource context); GL_APICALL PP_Resource GL_APIENTRY glGetCurrentContextPPAPI(); // Returns OpenGL ES 2.0 interface. -GL_APICALL const struct PPB_OpenGLES2_Dev* GL_APIENTRY glGetInterfacePPAPI(); +GL_APICALL const struct PPB_OpenGLES2* GL_APIENTRY glGetInterfacePPAPI(); #ifdef __cplusplus } diff --git a/ppapi/native_client/src/shared/ppapi_proxy/browser_globals.cc b/ppapi/native_client/src/shared/ppapi_proxy/browser_globals.cc index 566dcf6..1ac2a5f 100644 --- a/ppapi/native_client/src/shared/ppapi_proxy/browser_globals.cc +++ b/ppapi/native_client/src/shared/ppapi_proxy/browser_globals.cc @@ -213,16 +213,16 @@ const PPB_Graphics2D* PPBGraphics2DInterface() { return ppb; } -const PPB_Graphics3D_Dev* PPBGraphics3DInterface() { - static const PPB_Graphics3D_Dev* ppb = static_cast<const PPB_Graphics3D_Dev*>( - GetBrowserInterfaceSafe(PPB_GRAPHICS_3D_DEV_INTERFACE)); +const PPB_Graphics3D* PPBGraphics3DInterface() { + static const PPB_Graphics3D* ppb = static_cast<const PPB_Graphics3D*>( + GetBrowserInterfaceSafe(PPB_GRAPHICS_3D_INTERFACE)); return ppb; } -const PPB_Graphics3DTrusted_Dev* PPBGraphics3DTrustedInterface() { - static const PPB_Graphics3DTrusted_Dev* ppb = - static_cast<const PPB_Graphics3DTrusted_Dev*>( - GetBrowserInterfaceSafe(PPB_GRAPHICS_3D_TRUSTED_DEV_INTERFACE)); +const PPB_Graphics3DTrusted* PPBGraphics3DTrustedInterface() { + static const PPB_Graphics3DTrusted* ppb = + static_cast<const PPB_Graphics3DTrusted*>( + GetBrowserInterfaceSafe(PPB_GRAPHICS_3D_TRUSTED_INTERFACE)); return ppb; } diff --git a/ppapi/native_client/src/shared/ppapi_proxy/browser_globals.h b/ppapi/native_client/src/shared/ppapi_proxy/browser_globals.h index e0d17a1..e118e6a 100644 --- a/ppapi/native_client/src/shared/ppapi_proxy/browser_globals.h +++ b/ppapi/native_client/src/shared/ppapi_proxy/browser_globals.h @@ -9,8 +9,6 @@ #include "ppapi/c/dev/ppb_find_dev.h" #include "ppapi/c/dev/ppb_font_dev.h" #include "ppapi/c/dev/ppb_fullscreen_dev.h" -#include "ppapi/c/dev/ppb_graphics_3d_dev.h" -#include "ppapi/c/dev/ppb_graphics_3d_trusted_dev.h" #include "ppapi/c/dev/ppb_memory_dev.h" #include "ppapi/c/dev/ppb_scrollbar_dev.h" #include "ppapi/c/dev/ppb_testing_dev.h" @@ -25,6 +23,7 @@ #include "ppapi/c/ppb_file_ref.h" #include "ppapi/c/ppb_file_system.h" #include "ppapi/c/ppb_graphics_2d.h" +#include "ppapi/c/ppb_graphics_3d.h" #include "ppapi/c/ppb_image_data.h" #include "ppapi/c/ppb_input_event.h" #include "ppapi/c/ppb_instance.h" @@ -34,6 +33,7 @@ #include "ppapi/c/ppb_url_response_info.h" #include "ppapi/c/ppb_var.h" #include "ppapi/c/private/ppb_pdf.h" +#include "ppapi/c/trusted/ppb_graphics_3d_trusted.h" #include "ppapi/c/trusted/ppb_image_data_trusted.h" struct NaClSrpcRpc; @@ -105,8 +105,8 @@ const PPB_Find_Dev* PPBFindInterface(); const PPB_Font_Dev* PPBFontInterface(); const PPB_Fullscreen_Dev* PPBFullscreenInterface(); const PPB_Graphics2D* PPBGraphics2DInterface(); -const PPB_Graphics3D_Dev* PPBGraphics3DInterface(); -const PPB_Graphics3DTrusted_Dev* PPBGraphics3DTrustedInterface(); +const PPB_Graphics3D* PPBGraphics3DInterface(); +const PPB_Graphics3DTrusted* PPBGraphics3DTrustedInterface(); const PPB_ImageData* PPBImageDataInterface(); const PPB_ImageDataTrusted* PPBImageDataTrustedInterface(); const PPB_InputEvent* PPBInputEventInterface(); diff --git a/ppapi/native_client/src/shared/ppapi_proxy/browser_ppb_graphics_3d_rpc_server.cc b/ppapi/native_client/src/shared/ppapi_proxy/browser_ppb_graphics_3d_rpc_server.cc index 59fd02c..f86c735 100644 --- a/ppapi/native_client/src/shared/ppapi_proxy/browser_ppb_graphics_3d_rpc_server.cc +++ b/ppapi/native_client/src/shared/ppapi_proxy/browser_ppb_graphics_3d_rpc_server.cc @@ -14,11 +14,11 @@ #include "native_client/src/shared/ppapi_proxy/plugin_resource.h" #include "native_client/src/shared/ppapi_proxy/utility.h" #include "native_client/src/trusted/desc/nacl_desc_wrapper.h" -#include "ppapi/c/dev/pp_graphics_3d_dev.h" -#include "ppapi/c/dev/ppb_graphics_3d_dev.h" -#include "ppapi/c/dev/ppb_graphics_3d_trusted_dev.h" #include "ppapi/c/pp_errors.h" +#include "ppapi/c/pp_graphics_3d.h" +#include "ppapi/c/ppb_graphics_3d.h" #include "ppapi/c/private/ppb_gpu_blacklist_private.h" +#include "ppapi/c/trusted/ppb_graphics_3d_trusted.h" #include "srpcgen/ppb_rpc.h" using ppapi_proxy::DebugPrintf; diff --git a/ppapi/native_client/src/shared/ppapi_proxy/command_buffer_nacl.h b/ppapi/native_client/src/shared/ppapi_proxy/command_buffer_nacl.h index 0b0dd6a..a699241 100644 --- a/ppapi/native_client/src/shared/ppapi_proxy/command_buffer_nacl.h +++ b/ppapi/native_client/src/shared/ppapi_proxy/command_buffer_nacl.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Native Client Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -6,9 +6,9 @@ #define NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_COMMAND_BUFFER_NACL_H #include "gpu/command_buffer/common/command_buffer.h" -#include "ppapi/c/dev/pp_graphics_3d_dev.h" -#include "ppapi/c/dev/ppb_graphics_3d_trusted_dev.h" +#include "ppapi/c/pp_graphics_3d.h" #include "ppapi/c/pp_resource.h" +#include "ppapi/c/trusted/ppb_graphics_3d_trusted.h" struct PPB_Core; diff --git a/ppapi/native_client/src/shared/ppapi_proxy/plugin_opengles.cc b/ppapi/native_client/src/shared/ppapi_proxy/plugin_opengles.cc index 266981c..af2f009 100644 --- a/ppapi/native_client/src/shared/ppapi_proxy/plugin_opengles.cc +++ b/ppapi/native_client/src/shared/ppapi_proxy/plugin_opengles.cc @@ -9,7 +9,7 @@ #include "native_client/src/shared/ppapi_proxy/plugin_ppb_graphics_3d.h" #include "gpu/command_buffer/client/gles2_implementation.h" -#include "ppapi/c/dev/ppb_opengles_dev.h" +#include "ppapi/c/ppb_opengles.h" using ppapi_proxy::PluginGraphics3D; using ppapi_proxy::PluginResource; @@ -632,8 +632,8 @@ void Viewport( } // namespace -const PPB_OpenGLES2_Dev* PluginGraphics3D::GetOpenGLESInterface() { - const static struct PPB_OpenGLES2_Dev ppb_opengles = { +const PPB_OpenGLES2* PluginGraphics3D::GetOpenGLESInterface() { + const static struct PPB_OpenGLES2 ppb_opengles = { &ActiveTexture, &AttachShader, &BindAttribLocation, diff --git a/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb.cc b/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb.cc index 8032f84..8db868e 100644 --- a/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb.cc +++ b/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb.cc @@ -61,7 +61,7 @@ InterfaceMapElement interface_map[] = { { PPB_FONT_DEV_INTERFACE, PluginFont::GetInterface(), true }, { PPB_FULLSCREEN_DEV_INTERFACE, PluginFullscreen::GetInterface(), true }, { PPB_GRAPHICS_2D_INTERFACE, PluginGraphics2D::GetInterface(), true }, - { PPB_GRAPHICS_3D_DEV_INTERFACE, PluginGraphics3D::GetInterface(), true }, + { PPB_GRAPHICS_3D_INTERFACE, PluginGraphics3D::GetInterface(), true }, { PPB_IMAGEDATA_INTERFACE, PluginImageData::GetInterface(), true }, { PPB_INPUT_EVENT_INTERFACE, PluginInputEvent::GetInterface(), true }, { PPB_INSTANCE_INTERFACE, PluginInstance::GetInterface(), true }, @@ -73,7 +73,7 @@ InterfaceMapElement interface_map[] = { PluginInputEvent::GetMouseInterface1_0(), true }, { PPB_MOUSE_INPUT_EVENT_INTERFACE_1_1, PluginInputEvent::GetMouseInterface1_1(), true }, - { PPB_OPENGLES2_DEV_INTERFACE, PluginGraphics3D::GetOpenGLESInterface(), + { PPB_OPENGLES2_INTERFACE, PluginGraphics3D::GetOpenGLESInterface(), true }, { PPB_PDF_INTERFACE, PluginPDF::GetInterface(), true }, { PPB_SCROLLBAR_DEV_INTERFACE, PluginScrollbar::GetInterface(), true }, diff --git a/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_graphics_3d.cc b/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_graphics_3d.cc index 3befbf5..974563a 100644 --- a/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_graphics_3d.cc +++ b/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_graphics_3d.cc @@ -259,8 +259,8 @@ int32_t PluginGraphics3D::SwapBuffers(PP_Resource graphics3d_id, // static -const PPB_Graphics3D_Dev* PluginGraphics3D::GetInterface() { - static const PPB_Graphics3D_Dev intf = { +const PPB_Graphics3D* PluginGraphics3D::GetInterface() { + static const PPB_Graphics3D intf = { &GetAttribMaxValue, &Create, &IsGraphics3D, diff --git a/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_graphics_3d.h b/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_graphics_3d.h index 63c3bca..f3358de 100644 --- a/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_graphics_3d.h +++ b/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_graphics_3d.h @@ -1,8 +1,6 @@ -/* - * Copyright 2011 The Native Client Authors. All rights reserved. - * Use of this source code is governed by a BSD-style license that can - * be found in the LICENSE file. - */ +// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. #ifndef NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_PPB_GRAPHICS_3D_H_ #define NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_PPB_GRAPHICS_3D_H_ @@ -10,9 +8,9 @@ #include "base/scoped_ptr.h" #include "native_client/src/include/nacl_macros.h" #include "native_client/src/shared/ppapi_proxy/plugin_resource.h" -#include "ppapi/c/dev/pp_graphics_3d_dev.h" -#include "ppapi/c/dev/ppb_graphics_3d_dev.h" -#include "ppapi/c/dev/ppb_opengles_dev.h" +#include "ppapi/c/pp_graphics_3d.h" +#include "ppapi/c/ppb_graphics_3d.h" +#include "ppapi/c/ppb_opengles.h" #include "ppapi/c/pp_instance.h" namespace gpu { @@ -31,8 +29,8 @@ class PluginGraphics3D : public PluginResource { PluginGraphics3D(); virtual ~PluginGraphics3D(); - static const PPB_Graphics3D_Dev* GetInterface(); - static const PPB_OpenGLES2_Dev* GetOpenGLESInterface(); + static const PPB_Graphics3D* GetInterface(); + static const PPB_OpenGLES2* GetOpenGLESInterface(); virtual bool InitFromBrowserResource(PP_Resource graphics3d_id); diff --git a/ppapi/native_client/tests/ppapi_browser/ppb_dev/ppapi_ppb_dev.cc b/ppapi/native_client/tests/ppapi_browser/ppb_dev/ppapi_ppb_dev.cc index 1362a97..d1e6d6a 100644 --- a/ppapi/native_client/tests/ppapi_browser/ppb_dev/ppapi_ppb_dev.cc +++ b/ppapi/native_client/tests/ppapi_browser/ppb_dev/ppapi_ppb_dev.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Native Client Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // @@ -29,10 +29,8 @@ #include "ppapi/c/dev/ppb_font_dev.h" #include "ppapi/c/dev/ppb_fullscreen_dev.h" #include "ppapi/c/dev/ppb_gles_chromium_texture_mapping_dev.h" -#include "ppapi/c/dev/ppb_graphics_3d_dev.h" #include "ppapi/c/dev/ppb_layer_compositor_dev.h" #include "ppapi/c/dev/ppb_memory_dev.h" -#include "ppapi/c/dev/ppb_opengles_dev.h" #include "ppapi/c/dev/ppb_scrollbar_dev.h" #include "ppapi/c/dev/ppb_surface_3d_dev.h" #include "ppapi/c/dev/ppb_testing_dev.h" @@ -67,10 +65,8 @@ void TestGetDevInterfaces() { CHECK(GetBrowserInterface(PPB_FULLSCREEN_DEV_INTERFACE) == NULL); CHECK(GetBrowserInterface( PPB_GLES_CHROMIUM_TEXTURE_MAPPING_DEV_INTERFACE) == NULL); - CHECK(GetBrowserInterface(PPB_GRAPHICS_3D_DEV_INTERFACE) == NULL); CHECK(GetBrowserInterface(PPB_LAYER_COMPOSITOR_DEV_INTERFACE) == NULL); CHECK(GetBrowserInterface(PPB_MEMORY_DEV_INTERFACE) == NULL); - CHECK(GetBrowserInterface(PPB_OPENGLES2_DEV_INTERFACE) == NULL); CHECK(GetBrowserInterface(PPB_SCROLLBAR_DEV_INTERFACE) == NULL); CHECK(GetBrowserInterface(PPB_SURFACE_3D_DEV_INTERFACE) == NULL); CHECK(GetBrowserInterface(PPB_TESTING_DEV_INTERFACE) == NULL); diff --git a/ppapi/native_client/tests/ppapi_browser/ppb_graphics3d/ppapi_ppb_graphics3d.cc b/ppapi/native_client/tests/ppapi_browser/ppb_graphics3d/ppapi_ppb_graphics3d.cc index 63f1143..9621c5e 100644 --- a/ppapi/native_client/tests/ppapi_browser/ppb_graphics3d/ppapi_ppb_graphics3d.cc +++ b/ppapi/native_client/tests/ppapi_browser/ppb_graphics3d/ppapi_ppb_graphics3d.cc @@ -14,19 +14,19 @@ #include "native_client/tests/ppapi_test_lib/get_browser_interface.h" #include "native_client/tests/ppapi_test_lib/internal_utils.h" #include "native_client/tests/ppapi_test_lib/test_interface.h" -#include "ppapi/c/dev/pp_graphics_3d_dev.h" -#include "ppapi/c/dev/ppb_graphics_3d_dev.h" -#include "ppapi/c/dev/ppb_opengles_dev.h" #include "ppapi/c/dev/ppb_testing_dev.h" #include "ppapi/c/pp_bool.h" #include "ppapi/c/pp_completion_callback.h" #include "ppapi/c/pp_errors.h" +#include "ppapi/c/pp_graphics_3d.h" #include "ppapi/c/pp_point.h" #include "ppapi/c/pp_rect.h" #include "ppapi/c/pp_size.h" #include "ppapi/c/ppb_core.h" +#include "ppapi/c/ppb_graphics_3d.h" #include "ppapi/c/ppb_image_data.h" #include "ppapi/c/ppb_instance.h" +#include "ppapi/c/ppb_opengles.h" #include "ppapi/c/ppb_url_loader.h" #include "ppapi/lib/gl/gles2/gl2ext_ppapi.h" @@ -40,13 +40,13 @@ const int kHeight = 200; // Tests the Graphics3D interface is available. void TestGraphics3DInterface() { - EXPECT(PPBGraphics3DDev() != NULL); + EXPECT(PPBGraphics3D() != NULL); TEST_PASSED; } // Tests the OpenGLES interface is available. void TestOpenGLES2Interface() { - EXPECT(PPBOpenGLES2Dev() != NULL); + EXPECT(PPBOpenGLES2() != NULL); TEST_PASSED; } @@ -56,20 +56,20 @@ void TestCreate() { PP_GRAPHICS3DATTRIB_WIDTH, kWidth, PP_GRAPHICS3DATTRIB_HEIGHT, kHeight, PP_GRAPHICS3DATTRIB_NONE}; - PP_Resource graphics3d_id = PPBGraphics3DDev()-> + PP_Resource graphics3d_id = PPBGraphics3D()-> Create(pp_instance(), kInvalidResource, attribs); EXPECT(graphics3d_id != kInvalidResource); PPBCore()->ReleaseResource(graphics3d_id); - PP_Resource invalid_graphics3d_id = PPBGraphics3DDev()-> + PP_Resource invalid_graphics3d_id = PPBGraphics3D()-> Create(0, kInvalidResource, attribs); EXPECT(invalid_graphics3d_id == kInvalidResource); int32_t empty_attribs[] = { PP_GRAPHICS3DATTRIB_NONE}; - PP_Resource graphics3d_empty_attrib_id = PPBGraphics3DDev()-> + PP_Resource graphics3d_empty_attrib_id = PPBGraphics3D()-> Create(pp_instance(), kInvalidResource, empty_attribs); EXPECT(graphics3d_empty_attrib_id != kInvalidResource); PPBCore()->ReleaseResource(graphics3d_empty_attrib_id); - PP_Resource graphics3d_null_attrib_id = PPBGraphics3DDev()-> + PP_Resource graphics3d_null_attrib_id = PPBGraphics3D()-> Create(pp_instance(), kInvalidResource, NULL); EXPECT(graphics3d_null_attrib_id != kInvalidResource); PPBCore()->ReleaseResource(graphics3d_null_attrib_id); @@ -82,10 +82,10 @@ void TestIsGraphics3D() { PP_GRAPHICS3DATTRIB_WIDTH, kWidth, PP_GRAPHICS3DATTRIB_HEIGHT, kHeight, PP_GRAPHICS3DATTRIB_NONE}; - PP_Resource graphics3d_id = PPBGraphics3DDev()-> + PP_Resource graphics3d_id = PPBGraphics3D()-> Create(pp_instance(), kInvalidResource, attribs); EXPECT(graphics3d_id != kInvalidResource); - EXPECT(PPBGraphics3DDev()->IsGraphics3D(graphics3d_id) == PP_TRUE); + EXPECT(PPBGraphics3D()->IsGraphics3D(graphics3d_id) == PP_TRUE); PPBCore()->ReleaseResource(graphics3d_id); TEST_PASSED; } @@ -118,7 +118,7 @@ void TestSwapCallback(void* user_data, int32_t result) { if (info->frame_counter < info->frame_end) { PP_CompletionCallback cc = PP_MakeCompletionCallback(TestSwapCallback, info); - int32_t result = PPBGraphics3DDev()->SwapBuffers(info->graphics3d_id, cc); + int32_t result = PPBGraphics3D()->SwapBuffers(info->graphics3d_id, cc); CHECK(PP_OK_COMPLETIONPENDING == result); } else { PPBCore()->ReleaseResource(info->graphics3d_id); @@ -135,7 +135,7 @@ void TestSwapBuffers() { PP_GRAPHICS3DATTRIB_WIDTH, kWidth, PP_GRAPHICS3DATTRIB_HEIGHT, kHeight, PP_GRAPHICS3DATTRIB_NONE}; - PP_Resource graphics3d_id = PPBGraphics3DDev()-> + PP_Resource graphics3d_id = PPBGraphics3D()-> Create(pp_instance(), kInvalidResource, attribs); EXPECT(graphics3d_id != kInvalidResource); int32_t success = PPBInstance()->BindGraphics(pp_instance(), graphics3d_id); @@ -150,6 +150,86 @@ void TestSwapBuffers() { PPBCore()->CallOnMainThread(0, cc, PP_OK); } +void TestResizeAndSwapCallback(void* user_data, int32_t result) { + EXPECT(result == PP_OK); + RenderInfo* info = static_cast<RenderInfo *>(user_data); + int32_t new_width = kWidth - info->frame_counter * 2; + int32_t new_height = kHeight - info->frame_counter * 2; + if (new_width < 0) new_width = 0; + if (new_height < 0) new_height = 0; + int32_t resize_result = PPBGraphics3D()->ResizeBuffers(info->graphics3d_id, + new_width, new_height); + EXPECT(resize_result == PP_OK); + // Set graphics3d_id to the main context, so we can use normal gl style calls + // instead of going through the PPAPI PPBOpenGLES2 interface. + glSetCurrentContextPPAPI(info->graphics3d_id); + // Note: still use original width & height in glViewport; visual inspection + // should show a clipped window that shrinks to new_width, new_height size. + glViewport(0, 0, new_width, new_height); + float green = float(info->frame_counter) / float(info->frame_end); + glClearColor(0.0f, green, 0.0f, 1.0f); + glClear(GL_COLOR_BUFFER_BIT); + info->frame_counter += info->frame_increment; + if (info->frame_counter < info->frame_end) { + PP_CompletionCallback cc = + PP_MakeCompletionCallback(TestResizeAndSwapCallback, info); + int32_t result = PPBGraphics3D()->SwapBuffers(info->graphics3d_id, cc); + CHECK(PP_OK_COMPLETIONPENDING == result); + } else { + PPBCore()->ReleaseResource(info->graphics3d_id); + delete info; + TEST_PASSED; + } + glSetCurrentContextPPAPI(0); +} + +// Tests PPB_Graphics3D::ResizeBuffers(). +void TestResizeBuffers(int32_t* attribs) { + PP_Resource graphics3d_id = PPBGraphics3D()-> + Create(pp_instance(), kInvalidResource, attribs); + EXPECT(graphics3d_id != kInvalidResource); + int32_t success = PPBInstance()->BindGraphics(pp_instance(), graphics3d_id); + EXPECT(success == PP_TRUE); + int32_t result; + // Attempt negative width & heights + result = PPBGraphics3D()->ResizeBuffers(graphics3d_id, -1000, 0); + EXPECT(result == PP_ERROR_BADARGUMENT); + result = PPBGraphics3D()->ResizeBuffers(graphics3d_id, 100, -1); + EXPECT(result == PP_ERROR_BADARGUMENT); + result = PPBGraphics3D()->ResizeBuffers(graphics3d_id, -1, -1); + EXPECT(result == PP_ERROR_BADARGUMENT); + RenderInfo* render_info = new RenderInfo; + render_info->graphics3d_id = graphics3d_id; + render_info->frame_counter = 0; + render_info->frame_end = 256; + render_info->frame_increment = 8; + PP_CompletionCallback cc = PP_MakeCompletionCallback( + TestResizeAndSwapCallback, render_info); + PPBCore()->CallOnMainThread(0, cc, PP_OK); +} + + +// Tests PPB_Graphics3D::ResizeBuffers() w/o depth buffer attached. +void TestResizeBuffersWithoutDepthBuffer() { + int32_t attribs[] = { + PP_GRAPHICS3DATTRIB_WIDTH, kWidth, + PP_GRAPHICS3DATTRIB_HEIGHT, kHeight, + PP_GRAPHICS3DATTRIB_NONE}; + TestResizeBuffers(attribs); +} + + +// Tests PPB_Graphics3D::ResizeBuffers() w/ depth buffer attached. +void TestResizeBuffersWithDepthBuffer() { + int32_t attribs[] = { + PP_GRAPHICS3DATTRIB_WIDTH, kWidth, + PP_GRAPHICS3DATTRIB_HEIGHT, kHeight, + PP_GRAPHICS3DATTRIB_DEPTH_SIZE, 32, + PP_GRAPHICS3DATTRIB_NONE}; + TestResizeBuffers(attribs); +} + + // Tests glTerminatePPAPI. void Test_glTerminatePPAPI() { GLboolean terminate = glTerminatePPAPI(); @@ -166,6 +246,10 @@ void SetupTests() { RegisterTest("TestIsGraphics3D", TestIsGraphics3D); RegisterTest("Test_glInitializePPAPI", Test_glInitializePPAPI); RegisterTest("TestSwapBuffers", TestSwapBuffers); + RegisterTest("TestResizeBuffersWithoutDepthBuffer", + TestResizeBuffersWithoutDepthBuffer); + RegisterTest("TestResizeBuffersWithDepthBuffer", + TestResizeBuffersWithDepthBuffer); RegisterTest("Test_glTerminatePPAPI", Test_glTerminatePPAPI); } diff --git a/ppapi/native_client/tests/ppapi_browser/ppb_graphics3d/ppapi_ppb_graphics3d.html b/ppapi/native_client/tests/ppapi_browser/ppb_graphics3d/ppapi_ppb_graphics3d.html index 196747c..8fe0a01 100644 --- a/ppapi/native_client/tests/ppapi_browser/ppb_graphics3d/ppapi_ppb_graphics3d.html +++ b/ppapi/native_client/tests/ppapi_browser/ppb_graphics3d/ppapi_ppb_graphics3d.html @@ -38,6 +38,14 @@ function setupTests(tester, plugin) { tester.addAsyncTest('PPB_Graphics3D::SwapBuffers', function(test) { testAndAssertStatus(test, 'TestSwapBuffers', 'TestSwapCallback:PASSED'); }); + tester.addAsyncTest('PPB_Graphics3D::ResizeBuffers', function(test) { + testAndAssertStatus(test, 'TestResizeBuffersWithoutDepthBuffer', + 'TestResizeAndSwapCallback:PASSED'); + }); + tester.addAsyncTest('PPB_Graphics3D::ResizeBuffers w/ Depth', function(test) { + testAndAssertStatus(test, 'TestResizeBuffersWithDepthBuffer', + 'TestResizeAndSwapCallback:PASSED'); + }); tester.addAsyncTest('glTerminatePPAPI', function(test) { testAndAssertStatus(test, 'Test_glTerminatePPAPI'); }); @@ -46,7 +54,7 @@ function setupTests(tester, plugin) { </script> <title>PPAPI PPB_Graphics3D Test</title> </head> - <body> + <body style="height:100%"> <h1>PPAPI PPB_Graphics3D Test</h1> NOTE: requires --enable-pepper-testing --enable-accelerated-plugins <br> @@ -58,7 +66,7 @@ function setupTests(tester, plugin) { name="nacl_module" src="ppapi_ppb_graphics3d.nmf" style="background-color:#FFFFFF" - width="320" height="200" /> + width="80%" height="40%" /> <br> <script type="text/javascript"> //<![CDATA[ diff --git a/ppapi/native_client/tests/ppapi_test_lib/get_browser_interface.cc b/ppapi/native_client/tests/ppapi_test_lib/get_browser_interface.cc index c725ba3..08d4316 100644 --- a/ppapi/native_client/tests/ppapi_test_lib/get_browser_interface.cc +++ b/ppapi/native_client/tests/ppapi_test_lib/get_browser_interface.cc @@ -8,9 +8,7 @@ #include "ppapi/c/dev/ppb_cursor_control_dev.h" #include "ppapi/c/dev/ppb_font_dev.h" #include "ppapi/c/dev/ppb_fullscreen_dev.h" -#include "ppapi/c/dev/ppb_graphics_3d_dev.h" #include "ppapi/c/dev/ppb_memory_dev.h" -#include "ppapi/c/dev/ppb_opengles_dev.h" #include "ppapi/c/dev/ppb_scrollbar_dev.h" #include "ppapi/c/dev/ppb_surface_3d_dev.h" #include "ppapi/c/dev/ppb_testing_dev.h" @@ -21,10 +19,12 @@ #include "ppapi/c/ppb_file_ref.h" #include "ppapi/c/ppb_file_system.h" #include "ppapi/c/ppb_graphics_2d.h" +#include "ppapi/c/ppb_graphics_3d.h" #include "ppapi/c/ppb_image_data.h" #include "ppapi/c/ppb_input_event.h" #include "ppapi/c/ppb_instance.h" #include "ppapi/c/ppb_messaging.h" +#include "ppapi/c/ppb_opengles.h" #include "ppapi/c/ppb_url_loader.h" #include "ppapi/c/ppb_url_request_info.h" #include "ppapi/c/ppb_url_response_info.h" @@ -70,6 +70,11 @@ const PPB_Graphics2D* PPBGraphics2D() { GetBrowserInterfaceSafe(PPB_GRAPHICS_2D_INTERFACE)); } +const PPB_Graphics3D* PPBGraphics3D() { + return reinterpret_cast<const PPB_Graphics3D*>( + GetBrowserInterface(PPB_GRAPHICS_3D_INTERFACE)); +} + const PPB_ImageData* PPBImageData() { return reinterpret_cast<const PPB_ImageData*>( GetBrowserInterfaceSafe(PPB_IMAGEDATA_INTERFACE)); @@ -100,6 +105,11 @@ const PPB_MouseInputEvent* PPBMouseInputEvent() { GetBrowserInterfaceSafe(PPB_MOUSE_INPUT_EVENT_INTERFACE)); } +const PPB_OpenGLES2* PPBOpenGLES2() { + return reinterpret_cast<const PPB_OpenGLES2*>( + GetBrowserInterface(PPB_OPENGLES2_INTERFACE)); +} + const PPB_URLLoader* PPBURLLoader() { return reinterpret_cast<const PPB_URLLoader*>( GetBrowserInterfaceSafe(PPB_URLLOADER_INTERFACE)); @@ -138,11 +148,6 @@ const PPB_CursorControl_Dev* PPBCursorControlDev() { GetBrowserInterface(PPB_CURSOR_CONTROL_DEV_INTERFACE)); } -const PPB_Graphics3D_Dev* PPBGraphics3DDev() { - return reinterpret_cast<const PPB_Graphics3D_Dev*>( - GetBrowserInterface(PPB_GRAPHICS_3D_DEV_INTERFACE)); -} - const PPB_Font_Dev* PPBFontDev() { return reinterpret_cast<const PPB_Font_Dev*>( GetBrowserInterface(PPB_FONT_DEV_INTERFACE)); @@ -158,11 +163,6 @@ const PPB_Memory_Dev* PPBMemoryDev() { GetBrowserInterface(PPB_MEMORY_DEV_INTERFACE)); } -const PPB_OpenGLES2_Dev* PPBOpenGLES2Dev() { - return reinterpret_cast<const PPB_OpenGLES2_Dev*>( - GetBrowserInterface(PPB_OPENGLES2_DEV_INTERFACE)); -} - const PPB_Scrollbar_Dev* PPBScrollbarDev() { return reinterpret_cast<const PPB_Scrollbar_Dev*>( GetBrowserInterface(PPB_SCROLLBAR_DEV_INTERFACE)); diff --git a/ppapi/native_client/tests/ppapi_test_lib/get_browser_interface.h b/ppapi/native_client/tests/ppapi_test_lib/get_browser_interface.h index 405754d..826ad1b 100644 --- a/ppapi/native_client/tests/ppapi_test_lib/get_browser_interface.h +++ b/ppapi/native_client/tests/ppapi_test_lib/get_browser_interface.h @@ -22,7 +22,7 @@ struct PPB_FileSystem; struct PPB_Font_Dev; struct PPB_Fullscreen_Dev; struct PPB_Graphics2D; -struct PPB_Graphics3D_Dev; +struct PPB_Graphics3D; struct PPB_ImageData; struct PPB_InputEvent; struct PPB_Instance; @@ -30,7 +30,7 @@ struct PPB_KeyboardInputEvent; struct PPB_Memory_Dev; struct PPB_Messaging; struct PPB_MouseInputEvent; -struct PPB_OpenGLES2_Dev; +struct PPB_OpenGLES2; struct PPB_Surface3D_Dev; struct PPB_Testing_Dev; struct PPB_URLLoader; @@ -55,12 +55,14 @@ const PPB_FileIO* PPBFileIO(); const PPB_FileRef* PPBFileRef(); const PPB_FileSystem* PPBFileSystem(); const PPB_Graphics2D* PPBGraphics2D(); +const PPB_Graphics3D* PPBGraphics3D(); const PPB_ImageData* PPBImageData(); const PPB_InputEvent* PPBInputEvent(); const PPB_Instance* PPBInstance(); const PPB_KeyboardInputEvent* PPBKeyboardInputEvent(); const PPB_Messaging* PPBMessaging(); const PPB_MouseInputEvent* PPBMouseInputEvent(); +const PPB_OpenGLES2* PPBOpenGLES2(); const PPB_URLLoader* PPBURLLoader(); const PPB_URLRequestInfo* PPBURLRequestInfo(); const PPB_URLResponseInfo* PPBURLResponseInfo(); @@ -76,9 +78,7 @@ const PPB_Context3D_Dev* PPBContext3DDev(); const PPB_CursorControl_Dev* PPBCursorControlDev(); const PPB_Font_Dev* PPBFontDev(); const PPB_Fullscreen_Dev* PPBFullscreenDev(); -const PPB_Graphics3D_Dev* PPBGraphics3DDev(); const PPB_Memory_Dev* PPBMemoryDev(); -const PPB_OpenGLES2_Dev* PPBOpenGLES2Dev(); const PPB_Scrollbar_Dev* PPBScrollbarDev(); const PPB_Surface3D_Dev* PPBSurface3DDev(); const PPB_Testing_Dev* PPBTestingDev(); diff --git a/ppapi/ppapi_cpp.gypi b/ppapi/ppapi_cpp.gypi index 42cfece..3c01319 100644 --- a/ppapi/ppapi_cpp.gypi +++ b/ppapi/ppapi_cpp.gypi @@ -17,6 +17,7 @@ 'c/pp_completion_callback.h', 'c/pp_errors.h', 'c/pp_file_info.h', + 'c/pp_graphics_3d.h', 'c/pp_input_event.h', 'c/pp_instance.h', 'c/pp_macros.h', @@ -36,22 +37,24 @@ 'c/ppb_file_ref.h', 'c/ppb_file_system.h', 'c/ppb_graphics_2d.h', + 'c/ppb_graphics_3d.h', 'c/ppb_image_data.h', 'c/ppb_input_event.h', 'c/ppb_instance.h', 'c/ppb_messaging.h', + 'c/ppb_opengles.h', 'c/ppb_url_loader.h', 'c/ppb_url_request_info.h', 'c/ppb_url_response_info.h', 'c/ppb_var.h', 'c/ppp.h', + 'c/ppp_graphics_3d.h', 'c/ppp_input_event.h', 'c/ppp_instance.h', 'c/ppp_messaging.h', # Dev interfaces. 'c/dev/pp_cursor_type_dev.h', - 'c/dev/pp_graphics_3d_dev.h', 'c/dev/pp_video_dev.h', 'c/dev/ppb_buffer_dev.h', 'c/dev/ppb_char_set_dev.h', @@ -64,10 +67,7 @@ 'c/dev/ppb_find_dev.h', 'c/dev/ppb_font_dev.h', 'c/dev/ppb_fullscreen_dev.h', - 'c/dev/ppb_graphics_3d_dev.h', - 'c/dev/ppb_graphics_3d_trusted_dev.h', 'c/dev/ppb_memory_dev.h', - 'c/dev/ppb_opengles_dev.h', 'c/dev/ppb_query_policy_dev.h', 'c/dev/ppb_scrollbar_dev.h', 'c/dev/ppb_surface_3d_dev.h', @@ -78,7 +78,6 @@ 'c/dev/ppb_zoom_dev.h', 'c/dev/ppp_cursor_control_dev.h', 'c/dev/ppp_find_dev.h', - 'c/dev/ppp_graphics_3d_dev.h', 'c/dev/ppp_network_state_dev.h', 'c/dev/ppp_policy_update_dev.h', 'c/dev/ppp_printing_dev.h', @@ -112,6 +111,7 @@ 'c/trusted/ppb_broker_trusted.h', 'c/trusted/ppb_buffer_trusted.h', 'c/trusted/ppb_file_io_trusted.h', + 'c/trusted/ppb_graphics_3d_trusted.h', 'c/trusted/ppb_image_data_trusted.h', 'c/trusted/ppb_url_loader_trusted.h', 'c/trusted/ppp_broker.h', @@ -150,6 +150,10 @@ 'cpp/file_system.h', 'cpp/graphics_2d.cc', 'cpp/graphics_2d.h', + 'cpp/graphics_3d.cc', + 'cpp/graphics_3d.h', + 'cpp/graphics_3d_client.cc', + 'cpp/graphics_3d_client.h', 'cpp/image_data.cc', 'cpp/image_data.h', 'cpp/input_event.cc', @@ -197,10 +201,6 @@ 'cpp/dev/font_dev.h', 'cpp/dev/fullscreen_dev.cc', 'cpp/dev/fullscreen_dev.h', - 'cpp/dev/graphics_3d_client_dev.cc', - 'cpp/dev/graphics_3d_client_dev.h', - 'cpp/dev/graphics_3d_dev.cc', - 'cpp/dev/graphics_3d_dev.h', 'cpp/dev/memory_dev.cc', 'cpp/dev/memory_dev.h', 'cpp/dev/printing_dev.cc', diff --git a/ppapi/proxy/dispatcher.cc b/ppapi/proxy/dispatcher.cc index a9c5dd7..7c099a7 100644 --- a/ppapi/proxy/dispatcher.cc +++ b/ppapi/proxy/dispatcher.cc @@ -18,7 +18,6 @@ #include "ppapi/c/dev/ppb_cursor_control_dev.h" #include "ppapi/c/dev/ppb_gles_chromium_texture_mapping_dev.h" #include "ppapi/c/dev/ppb_font_dev.h" -#include "ppapi/c/dev/ppb_opengles_dev.h" #include "ppapi/c/dev/ppb_surface_3d_dev.h" #include "ppapi/c/dev/ppb_testing_dev.h" #include "ppapi/c/dev/ppb_url_util_dev.h" @@ -30,6 +29,7 @@ #include "ppapi/c/ppb_graphics_2d.h" #include "ppapi/c/ppb_image_data.h" #include "ppapi/c/ppb_instance.h" +#include "ppapi/c/ppb_opengles.h" #include "ppapi/c/ppb_url_loader.h" #include "ppapi/c/ppb_url_request_info.h" #include "ppapi/c/ppb_url_response_info.h" diff --git a/ppapi/proxy/interface_id.h b/ppapi/proxy/interface_id.h index c909806..595b2c8 100644 --- a/ppapi/proxy/interface_id.h +++ b/ppapi/proxy/interface_id.h @@ -55,7 +55,7 @@ enum InterfaceID { INTERFACE_ID_PPB_VIDEO_DECODER_DEV, INTERFACE_ID_PPP_CLASS, - INTERFACE_ID_PPP_GRAPHICS_3D_DEV, + INTERFACE_ID_PPP_GRAPHICS_3D, INTERFACE_ID_PPP_INPUT_EVENT, INTERFACE_ID_PPP_INSTANCE, INTERFACE_ID_PPP_INSTANCE_PRIVATE, diff --git a/ppapi/proxy/ppb_context_3d_proxy.h b/ppapi/proxy/ppb_context_3d_proxy.h index 8a49efe..a24a78d 100644 --- a/ppapi/proxy/ppb_context_3d_proxy.h +++ b/ppapi/proxy/ppb_context_3d_proxy.h @@ -10,7 +10,7 @@ #include "base/memory/scoped_ptr.h" #include "base/shared_memory.h" #include "gpu/command_buffer/common/command_buffer.h" -#include "ppapi/c/dev/pp_graphics_3d_dev.h" +#include "ppapi/c/pp_graphics_3d.h" #include "ppapi/c/pp_instance.h" #include "ppapi/proxy/interface_proxy.h" #include "ppapi/proxy/proxy_non_thread_safe_ref_count.h" diff --git a/ppapi/proxy/ppb_graphics_3d_proxy.cc b/ppapi/proxy/ppb_graphics_3d_proxy.cc index 834f49e..31d9ccb 100644 --- a/ppapi/proxy/ppb_graphics_3d_proxy.cc +++ b/ppapi/proxy/ppb_graphics_3d_proxy.cc @@ -408,7 +408,7 @@ PPB_Graphics3D_Proxy::~PPB_Graphics3D_Proxy() { const InterfaceProxy::Info* PPB_Graphics3D_Proxy::GetInfo() { static const Info info = { thunk::GetPPB_Graphics3D_Thunk(), - PPB_GRAPHICS_3D_DEV_INTERFACE, + PPB_GRAPHICS_3D_INTERFACE, INTERFACE_ID_PPB_GRAPHICS_3D, false, &CreateGraphics3DProxy, diff --git a/ppapi/proxy/ppb_graphics_3d_proxy.h b/ppapi/proxy/ppb_graphics_3d_proxy.h index db67a2f..4fd97a2 100644 --- a/ppapi/proxy/ppb_graphics_3d_proxy.h +++ b/ppapi/proxy/ppb_graphics_3d_proxy.h @@ -9,7 +9,7 @@ #include "base/shared_memory.h" #include "gpu/command_buffer/common/command_buffer.h" -#include "ppapi/c/dev/pp_graphics_3d_dev.h" +#include "ppapi/c/pp_graphics_3d.h" #include "ppapi/c/pp_instance.h" #include "ppapi/cpp/completion_callback.h" #include "ppapi/proxy/interface_proxy.h" @@ -72,8 +72,8 @@ class PPB_Graphics3D_Proxy : public InterfaceProxy { PP_Resource share_context, const int32_t* attrib_list); - const PPB_Graphics3D_Dev* ppb_graphics_3d_target() const { - return static_cast<const PPB_Graphics3D_Dev*>(target_interface()); + const PPB_Graphics3D* ppb_graphics_3d_target() const { + return static_cast<const PPB_Graphics3D*>(target_interface()); } // InterfaceProxy implementation. diff --git a/ppapi/proxy/ppb_opengles2_proxy.cc b/ppapi/proxy/ppb_opengles2_proxy.cc index af22cf0..9516678 100644 --- a/ppapi/proxy/ppb_opengles2_proxy.cc +++ b/ppapi/proxy/ppb_opengles2_proxy.cc @@ -28,7 +28,7 @@ PPB_OpenGLES2_Proxy::~PPB_OpenGLES2_Proxy() { const InterfaceProxy::Info* PPB_OpenGLES2_Proxy::GetInfo() { static const Info info = { ppapi::OpenGLES2Impl::GetInterface(), - PPB_OPENGLES2_DEV_INTERFACE, + PPB_OPENGLES2_INTERFACE, INTERFACE_ID_PPB_OPENGLES2, false, &CreateOpenGLES2Proxy, diff --git a/ppapi/proxy/ppb_surface_3d_proxy.h b/ppapi/proxy/ppb_surface_3d_proxy.h index 214bda1..ce7e8b6 100644 --- a/ppapi/proxy/ppb_surface_3d_proxy.h +++ b/ppapi/proxy/ppb_surface_3d_proxy.h @@ -7,8 +7,8 @@ #include <vector> -#include "ppapi/c/dev/pp_graphics_3d_dev.h" #include "ppapi/c/pp_completion_callback.h" +#include "ppapi/c/pp_graphics_3d.h" #include "ppapi/c/pp_instance.h" #include "ppapi/cpp/completion_callback.h" #include "ppapi/proxy/interface_proxy.h" diff --git a/ppapi/proxy/ppp_graphics_3d_proxy.cc b/ppapi/proxy/ppp_graphics_3d_proxy.cc index 2ca0231..a477227 100644 --- a/ppapi/proxy/ppp_graphics_3d_proxy.cc +++ b/ppapi/proxy/ppp_graphics_3d_proxy.cc @@ -4,7 +4,7 @@ #include "ppapi/proxy/ppp_graphics_3d_proxy.h" -#include "ppapi/c/dev/ppp_graphics_3d_dev.h" +#include "ppapi/c/ppp_graphics_3d.h" #include "ppapi/proxy/host_dispatcher.h" #include "ppapi/proxy/plugin_dispatcher.h" #include "ppapi/proxy/ppapi_messages.h" @@ -16,11 +16,11 @@ namespace { void ContextLost(PP_Instance instance) { HostDispatcher::GetForInstance(instance)->Send( - new PpapiMsg_PPPGraphics3D_ContextLost(INTERFACE_ID_PPP_GRAPHICS_3D_DEV, + new PpapiMsg_PPPGraphics3D_ContextLost(INTERFACE_ID_PPP_GRAPHICS_3D, instance)); } -static const PPP_Graphics3D_Dev graphics_3d_interface = { +static const PPP_Graphics3D graphics_3d_interface = { &ContextLost }; @@ -43,8 +43,8 @@ PPP_Graphics3D_Proxy::~PPP_Graphics3D_Proxy() { const InterfaceProxy::Info* PPP_Graphics3D_Proxy::GetInfo() { static const Info info = { &graphics_3d_interface, - PPP_GRAPHICS_3D_DEV_INTERFACE, - INTERFACE_ID_PPP_GRAPHICS_3D_DEV, + PPP_GRAPHICS_3D_INTERFACE, + INTERFACE_ID_PPP_GRAPHICS_3D, false, &CreateGraphics3DProxy, }; diff --git a/ppapi/proxy/ppp_graphics_3d_proxy.h b/ppapi/proxy/ppp_graphics_3d_proxy.h index 8d9fac3..eb3d3b0 100644 --- a/ppapi/proxy/ppp_graphics_3d_proxy.h +++ b/ppapi/proxy/ppp_graphics_3d_proxy.h @@ -9,7 +9,7 @@ #include "ppapi/proxy/interface_proxy.h" #include "ppapi/shared_impl/host_resource.h" -struct PPP_Graphics3D_Dev; +struct PPP_Graphics3D; namespace ppapi { namespace proxy { @@ -21,8 +21,8 @@ class PPP_Graphics3D_Proxy : public InterfaceProxy { static const Info* GetInfo(); - const PPP_Graphics3D_Dev* ppp_graphics_3d_target() const { - return reinterpret_cast<const PPP_Graphics3D_Dev*>(target_interface()); + const PPP_Graphics3D* ppp_graphics_3d_target() const { + return reinterpret_cast<const PPP_Graphics3D*>(target_interface()); } // InterfaceProxy implementation. diff --git a/ppapi/shared_impl/opengles2_impl.cc b/ppapi/shared_impl/opengles2_impl.cc index d79fb10..400f0bc 100644 --- a/ppapi/shared_impl/opengles2_impl.cc +++ b/ppapi/shared_impl/opengles2_impl.cc @@ -750,7 +750,7 @@ void Viewport( } -const struct PPB_OpenGLES2_Dev ppb_opengles2 = { +const struct PPB_OpenGLES2 ppb_opengles2 = { &ActiveTexture, &AttachShader, &BindAttribLocation, @@ -897,7 +897,7 @@ const struct PPB_OpenGLES2_Dev ppb_opengles2 = { } // namespace -const PPB_OpenGLES2_Dev* OpenGLES2Impl::GetInterface() { +const PPB_OpenGLES2* OpenGLES2Impl::GetInterface() { return &ppb_opengles2; } diff --git a/ppapi/shared_impl/opengles2_impl.h b/ppapi/shared_impl/opengles2_impl.h index ea2a3b7..261ffd2 100644 --- a/ppapi/shared_impl/opengles2_impl.h +++ b/ppapi/shared_impl/opengles2_impl.h @@ -5,14 +5,14 @@ #ifndef PPAPI_SHARED_IMPL_OPENGLES2_IMPL_H_ #define PPAPI_SHARED_IMPL_OPENGLES2_IMPL_H_ -#include "ppapi/c/dev/ppb_opengles_dev.h" +#include "ppapi/c/ppb_opengles.h" #include "ppapi/shared_impl/ppapi_shared_export.h" namespace ppapi { class PPAPI_SHARED_EXPORT OpenGLES2Impl { public: - static const PPB_OpenGLES2_Dev* GetInterface(); + static const PPB_OpenGLES2* GetInterface(); }; } // namespace ppapi diff --git a/ppapi/tests/all_c_includes.h b/ppapi/tests/all_c_includes.h index 4303bf2..e924d13 100644 --- a/ppapi/tests/all_c_includes.h +++ b/ppapi/tests/all_c_includes.h @@ -10,7 +10,6 @@ #include "ppapi/c/dev/deprecated_bool.h" #include "ppapi/c/dev/pp_cursor_type_dev.h" -#include "ppapi/c/dev/pp_graphics_3d_dev.h" #include "ppapi/c/dev/pp_video_dev.h" #include "ppapi/c/dev/ppb_buffer_dev.h" #include "ppapi/c/dev/ppb_char_set_dev.h" @@ -24,11 +23,8 @@ #include "ppapi/c/dev/ppb_find_dev.h" #include "ppapi/c/dev/ppb_font_dev.h" #include "ppapi/c/dev/ppb_fullscreen_dev.h" -#include "ppapi/c/dev/ppb_graphics_3d_dev.h" -#include "ppapi/c/dev/ppb_graphics_3d_trusted_dev.h" #include "ppapi/c/dev/ppb_layer_compositor_dev.h" #include "ppapi/c/dev/ppb_memory_dev.h" -#include "ppapi/c/dev/ppb_opengles_dev.h" #include "ppapi/c/dev/ppb_query_policy_dev.h" #include "ppapi/c/dev/ppb_scrollbar_dev.h" #include "ppapi/c/dev/ppb_surface_3d_dev.h" @@ -43,7 +39,6 @@ #include "ppapi/c/dev/ppp_class_deprecated.h" #include "ppapi/c/dev/ppp_cursor_control_dev.h" #include "ppapi/c/dev/ppp_find_dev.h" -#include "ppapi/c/dev/ppp_graphics_3d_dev.h" #include "ppapi/c/dev/ppp_policy_update_dev.h" #include "ppapi/c/dev/ppp_printing_dev.h" #include "ppapi/c/dev/ppp_scrollbar_dev.h" @@ -56,6 +51,7 @@ #include "ppapi/c/pp_completion_callback.h" #include "ppapi/c/pp_errors.h" #include "ppapi/c/pp_file_info.h" +#include "ppapi/c/pp_graphics_3d.h" #include "ppapi/c/pp_input_event.h" #include "ppapi/c/pp_instance.h" #include "ppapi/c/pp_macros.h" @@ -75,14 +71,17 @@ #include "ppapi/c/ppb_file_ref.h" #include "ppapi/c/ppb_file_system.h" #include "ppapi/c/ppb_graphics_2d.h" +#include "ppapi/c/ppb_graphics_3d.h" #include "ppapi/c/ppb_image_data.h" #include "ppapi/c/ppb_input_event.h" #include "ppapi/c/ppb_instance.h" #include "ppapi/c/ppb_messaging.h" +#include "ppapi/c/ppb_opengles.h" #include "ppapi/c/ppb_url_loader.h" #include "ppapi/c/ppb_url_request_info.h" #include "ppapi/c/ppb_url_response_info.h" #include "ppapi/c/ppp.h" +#include "ppapi/c/ppp_graphics_3d.h" #include "ppapi/c/ppp_input_event.h" #include "ppapi/c/ppp_instance.h" #include "ppapi/c/ppp_messaging.h" @@ -90,6 +89,7 @@ #include "ppapi/c/private/ppb_flash_menu.h" #include "ppapi/c/private/ppb_flash_tcp_socket.h" #include "ppapi/c/private/ppb_gpu_blacklist_private.h" +#include "ppapi/c/trusted/ppb_graphics_3d_trusted.h" #include "ppapi/c/private/ppb_instance_private.h" #include "ppapi/c/private/ppb_nacl_private.h" #include "ppapi/c/private/ppb_pdf.h" diff --git a/ppapi/tests/all_cpp_includes.h b/ppapi/tests/all_cpp_includes.h index b931ef5..511bea9 100644 --- a/ppapi/tests/all_cpp_includes.h +++ b/ppapi/tests/all_cpp_includes.h @@ -20,8 +20,6 @@ #include "ppapi/cpp/dev/find_dev.h" #include "ppapi/cpp/dev/font_dev.h" #include "ppapi/cpp/dev/fullscreen_dev.h" -#include "ppapi/cpp/dev/graphics_3d_client_dev.h" -#include "ppapi/cpp/dev/graphics_3d_dev.h" #include "ppapi/cpp/dev/memory_dev.h" #include "ppapi/cpp/dev/printing_dev.h" #include "ppapi/cpp/dev/scriptable_object_deprecated.h" @@ -38,6 +36,8 @@ #include "ppapi/cpp/file_ref.h" #include "ppapi/cpp/file_system.h" #include "ppapi/cpp/graphics_2d.h" +#include "ppapi/cpp/graphics_3d.h" +#include "ppapi/cpp/graphics_3d_client.h" #include "ppapi/cpp/image_data.h" #include "ppapi/cpp/instance.h" #include "ppapi/cpp/logging.h" diff --git a/ppapi/tests/test_graphics_3d.cc b/ppapi/tests/test_graphics_3d.cc index 3035abf..9f409e7 100644 --- a/ppapi/tests/test_graphics_3d.cc +++ b/ppapi/tests/test_graphics_3d.cc @@ -6,9 +6,9 @@ #include <GLES2/gl2.h> -#include "ppapi/c/dev/ppb_opengles_dev.h" #include "ppapi/c/dev/ppb_testing_dev.h" -#include "ppapi/cpp/dev/graphics_3d_dev.h" +#include "ppapi/c/ppb_opengles.h" +#include "ppapi/cpp/graphics_3d.h" #include "ppapi/cpp/module.h" #include "ppapi/tests/test_utils.h" #include "ppapi/tests/testing_instance.h" @@ -16,8 +16,8 @@ REGISTER_TEST_CASE(Graphics3D); bool TestGraphics3D::Init() { - opengl_es2_ = reinterpret_cast<const PPB_OpenGLES2_Dev*>( - pp::Module::Get()->GetBrowserInterface(PPB_OPENGLES2_DEV_INTERFACE)); + opengl_es2_ = reinterpret_cast<const PPB_OpenGLES2*>( + pp::Module::Get()->GetBrowserInterface(PPB_OPENGLES2_INTERFACE)); return opengl_es2_ && InitTestingInterface(); } @@ -33,7 +33,7 @@ std::string TestGraphics3D::TestFrame() { PP_GRAPHICS3DATTRIB_HEIGHT, height, PP_GRAPHICS3DATTRIB_NONE }; - pp::Graphics3D_Dev context(*instance_, pp::Graphics3D_Dev(), attribs); + pp::Graphics3D context(*instance_, pp::Graphics3D(), attribs); ASSERT_FALSE(context.is_null()); // Clear color buffer to opaque red. @@ -50,7 +50,7 @@ std::string TestGraphics3D::TestFrame() { PASS(); } -int32_t TestGraphics3D::SwapBuffersSync(pp::Graphics3D_Dev* context) { +int32_t TestGraphics3D::SwapBuffersSync(pp::Graphics3D* context) { TestCompletionCallback callback(instance_->pp_instance(), true); int32_t rv = context->SwapBuffers(callback); if (rv != PP_OK_COMPLETIONPENDING) @@ -60,7 +60,7 @@ int32_t TestGraphics3D::SwapBuffersSync(pp::Graphics3D_Dev* context) { } std::string TestGraphics3D::TestPixel( - pp::Graphics3D_Dev* context, + pp::Graphics3D* context, int x, int y, const uint8_t expected_color[4]) { GLubyte pixel_color[4]; opengl_es2_->ReadPixels(context->pp_resource(), diff --git a/ppapi/tests/test_graphics_3d.h b/ppapi/tests/test_graphics_3d.h index 444716f..e671230 100644 --- a/ppapi/tests/test_graphics_3d.h +++ b/ppapi/tests/test_graphics_3d.h @@ -8,10 +8,10 @@ #include <string> #include "ppapi/tests/test_case.h" -struct PPB_OpenGLES2_Dev; +struct PPB_OpenGLES2; namespace pp { -class Graphics3D_Dev; +class Graphics3D; } // namespace pp class TestGraphics3D : public TestCase { @@ -27,12 +27,12 @@ class TestGraphics3D : public TestCase { std::string TestFrame(); // Utils used by various tests. - int32_t SwapBuffersSync(pp::Graphics3D_Dev* context); - std::string TestPixel(pp::Graphics3D_Dev* context, + int32_t SwapBuffersSync(pp::Graphics3D* context); + std::string TestPixel(pp::Graphics3D* context, int x, int y, const uint8_t expected_color[4]); // OpenGL ES2 interface. - const PPB_OpenGLES2_Dev* opengl_es2_; + const PPB_OpenGLES2* opengl_es2_; }; #endif // PAPPI_TESTS_TEST_GRAPHICS_3D_H_ diff --git a/ppapi/thunk/ppb_graphics_3d_api.h b/ppapi/thunk/ppb_graphics_3d_api.h index 7b782254..73e8178 100644 --- a/ppapi/thunk/ppb_graphics_3d_api.h +++ b/ppapi/thunk/ppb_graphics_3d_api.h @@ -5,8 +5,8 @@ #ifndef PPAPI_THUNK_PPB_GRAPHICS_3D_API_H_ #define PPAPI_THUNK_PPB_GRAPHICS_3D_API_H_ -#include "ppapi/c/dev/ppb_graphics_3d_dev.h" -#include "ppapi/c/dev/ppb_graphics_3d_trusted_dev.h" +#include "ppapi/c/ppb_graphics_3d.h" +#include "ppapi/c/trusted/ppb_graphics_3d_trusted.h" #include "ppapi/c/dev/ppb_gles_chromium_texture_mapping_dev.h" #include "ppapi/thunk/ppapi_thunk_export.h" diff --git a/ppapi/thunk/ppb_graphics_3d_thunk.cc b/ppapi/thunk/ppb_graphics_3d_thunk.cc index c706d33..f0e516c 100644 --- a/ppapi/thunk/ppb_graphics_3d_thunk.cc +++ b/ppapi/thunk/ppb_graphics_3d_thunk.cc @@ -76,7 +76,7 @@ int32_t SwapBuffers(PP_Resource graphics_3d, PP_CompletionCallback callback) { return MayForceCallback(callback, result); } -const PPB_Graphics3D_Dev g_ppb_graphics_3d_thunk = { +const PPB_Graphics3D g_ppb_graphics_3d_thunk = { &GetAttribMaxValue, &Create, &IsGraphics3D, @@ -89,7 +89,7 @@ const PPB_Graphics3D_Dev g_ppb_graphics_3d_thunk = { } // namespace -const PPB_Graphics3D_Dev* GetPPB_Graphics3D_Thunk() { +const PPB_Graphics3D* GetPPB_Graphics3D_Thunk() { return &g_ppb_graphics_3d_thunk; } diff --git a/ppapi/thunk/ppb_graphics_3d_trusted_thunk.cc b/ppapi/thunk/ppb_graphics_3d_trusted_thunk.cc index d9413f2..5cc9661 100644 --- a/ppapi/thunk/ppb_graphics_3d_trusted_thunk.cc +++ b/ppapi/thunk/ppb_graphics_3d_trusted_thunk.cc @@ -100,7 +100,7 @@ PP_Graphics3DTrustedState FlushSyncFast(PP_Resource context, return enter.object()->FlushSyncFast(put_offset, last_known_get); } -const PPB_Graphics3DTrusted_Dev g_ppb_graphics_3d_trusted_thunk = { +const PPB_Graphics3DTrusted g_ppb_graphics_3d_trusted_thunk = { &CreateRaw, &InitCommandBuffer, &GetRingBuffer, @@ -115,7 +115,7 @@ const PPB_Graphics3DTrusted_Dev g_ppb_graphics_3d_trusted_thunk = { } // namespace -const PPB_Graphics3DTrusted_Dev* GetPPB_Graphics3DTrusted_Thunk() { +const PPB_Graphics3DTrusted* GetPPB_Graphics3DTrusted_Thunk() { return &g_ppb_graphics_3d_trusted_thunk; } diff --git a/ppapi/thunk/resource_creation_api.h b/ppapi/thunk/resource_creation_api.h index e34f659..5cb7383 100644 --- a/ppapi/thunk/resource_creation_api.h +++ b/ppapi/thunk/resource_creation_api.h @@ -6,7 +6,6 @@ #define PPAPI_THUNK_RESOURCE_CREATION_API_H_ #include "ppapi/c/dev/ppb_file_chooser_dev.h" -#include "ppapi/c/dev/ppb_graphics_3d_dev.h" #include "ppapi/c/dev/ppb_video_layer_dev.h" #include "ppapi/c/pp_bool.h" #include "ppapi/c/pp_instance.h" @@ -14,6 +13,7 @@ #include "ppapi/c/ppb_audio.h" #include "ppapi/c/ppb_audio_config.h" #include "ppapi/c/ppb_file_system.h" +#include "ppapi/c/ppb_graphics_3d.h" #include "ppapi/c/ppb_image_data.h" #include "ppapi/c/ppb_input_event.h" #include "ppapi/proxy/interface_id.h" diff --git a/ppapi/thunk/thunk.h b/ppapi/thunk/thunk.h index 2871fff..a6d1dd9 100644 --- a/ppapi/thunk/thunk.h +++ b/ppapi/thunk/thunk.h @@ -31,8 +31,8 @@ struct PPB_Font_Dev; struct PPB_Fullscreen_Dev; struct PPB_GLESChromiumTextureMapping_Dev; struct PPB_Graphics2D; -struct PPB_Graphics3D_Dev; -struct PPB_Graphics3DTrusted_Dev; +struct PPB_Graphics3D; +struct PPB_Graphics3DTrusted; struct PPB_ImageData; struct PPB_ImageDataTrusted; struct PPB_InputEvent; @@ -91,8 +91,8 @@ PPAPI_THUNK_EXPORT const PPB_Fullscreen_Dev* GetPPB_Fullscreen_Thunk(); PPAPI_THUNK_EXPORT const PPB_GLESChromiumTextureMapping_Dev* GetPPB_GLESChromiumTextureMapping_Thunk(); PPAPI_THUNK_EXPORT const PPB_Graphics2D* GetPPB_Graphics2D_Thunk(); -PPAPI_THUNK_EXPORT const PPB_Graphics3D_Dev* GetPPB_Graphics3D_Thunk(); -PPAPI_THUNK_EXPORT const PPB_Graphics3DTrusted_Dev* +PPAPI_THUNK_EXPORT const PPB_Graphics3D* GetPPB_Graphics3D_Thunk(); +PPAPI_THUNK_EXPORT const PPB_Graphics3DTrusted* GetPPB_Graphics3DTrusted_Thunk(); PPAPI_THUNK_EXPORT const PPB_InputEvent* GetPPB_InputEvent_Thunk(); PPAPI_THUNK_EXPORT const PPB_ImageData* GetPPB_ImageData_Thunk(); |