| OLD | NEW |
| 1 /* | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 * Copyright 2011 The Native Client Authors. All rights reserved. | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 * Use of this source code is governed by a BSD-style license that can | 3 // found in the LICENSE file. |
| 4 * be found in the LICENSE file. | |
| 5 */ | |
| 6 | 4 |
| 7 #ifndef NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_PPB_GRAPHICS_3D_H_ | 5 #ifndef NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_PPB_GRAPHICS_3D_H_ |
| 8 #define NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_PPB_GRAPHICS_3D_H_ | 6 #define NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_PPB_GRAPHICS_3D_H_ |
| 9 | 7 |
| 10 #include "base/scoped_ptr.h" | 8 #include "base/scoped_ptr.h" |
| 11 #include "native_client/src/include/nacl_macros.h" | 9 #include "native_client/src/include/nacl_macros.h" |
| 12 #include "native_client/src/shared/ppapi_proxy/plugin_resource.h" | 10 #include "native_client/src/shared/ppapi_proxy/plugin_resource.h" |
| 13 #include "ppapi/c/dev/pp_graphics_3d_dev.h" | 11 #include "ppapi/c/pp_graphics_3d.h" |
| 14 #include "ppapi/c/dev/ppb_graphics_3d_dev.h" | 12 #include "ppapi/c/ppb_graphics_3d.h" |
| 15 #include "ppapi/c/dev/ppb_opengles_dev.h" | 13 #include "ppapi/c/ppb_opengles.h" |
| 16 #include "ppapi/c/pp_instance.h" | 14 #include "ppapi/c/pp_instance.h" |
| 17 | 15 |
| 18 namespace gpu { | 16 namespace gpu { |
| 19 class CommandBuffer; | 17 class CommandBuffer; |
| 20 namespace gles2 { | 18 namespace gles2 { |
| 21 class GLES2CmdHelper; | 19 class GLES2CmdHelper; |
| 22 class GLES2Implementation; | 20 class GLES2Implementation; |
| 23 } // namespace gles2 | 21 } // namespace gles2 |
| 24 } // namespace gpu | 22 } // namespace gpu |
| 25 | 23 |
| 26 namespace ppapi_proxy { | 24 namespace ppapi_proxy { |
| 27 | 25 |
| 28 // Implements the plugin (i.e., .nexe) side of the PPB_Graphics3D interface. | 26 // Implements the plugin (i.e., .nexe) side of the PPB_Graphics3D interface. |
| 29 class PluginGraphics3D : public PluginResource { | 27 class PluginGraphics3D : public PluginResource { |
| 30 public: | 28 public: |
| 31 PluginGraphics3D(); | 29 PluginGraphics3D(); |
| 32 virtual ~PluginGraphics3D(); | 30 virtual ~PluginGraphics3D(); |
| 33 | 31 |
| 34 static const PPB_Graphics3D_Dev* GetInterface(); | 32 static const PPB_Graphics3D* GetInterface(); |
| 35 static const PPB_OpenGLES2_Dev* GetOpenGLESInterface(); | 33 static const PPB_OpenGLES2* GetOpenGLESInterface(); |
| 36 | 34 |
| 37 virtual bool InitFromBrowserResource(PP_Resource graphics3d_id); | 35 virtual bool InitFromBrowserResource(PP_Resource graphics3d_id); |
| 38 | 36 |
| 39 gpu::gles2::GLES2Implementation* impl() { | 37 gpu::gles2::GLES2Implementation* impl() { |
| 40 return gles2_implementation_.get(); | 38 return gles2_implementation_.get(); |
| 41 } | 39 } |
| 42 | 40 |
| 43 int32_t SwapBuffers(PP_Resource graphics3d_id, | 41 int32_t SwapBuffers(PP_Resource graphics3d_id, |
| 44 struct PP_CompletionCallback callback); | 42 struct PP_CompletionCallback callback); |
| 45 | 43 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 68 static gpu::gles2::GLES2Implementation* implFromResourceSlow( | 66 static gpu::gles2::GLES2Implementation* implFromResourceSlow( |
| 69 PP_Resource context); | 67 PP_Resource context); |
| 70 | 68 |
| 71 IMPLEMENT_RESOURCE(PluginGraphics3D); | 69 IMPLEMENT_RESOURCE(PluginGraphics3D); |
| 72 NACL_DISALLOW_COPY_AND_ASSIGN(PluginGraphics3D); | 70 NACL_DISALLOW_COPY_AND_ASSIGN(PluginGraphics3D); |
| 73 }; | 71 }; |
| 74 | 72 |
| 75 } // namespace ppapi_proxy | 73 } // namespace ppapi_proxy |
| 76 | 74 |
| 77 #endif // NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_PPB_GRAPHICS_3D_H_ | 75 #endif // NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_PPB_GRAPHICS_3D_H_ |
| OLD | NEW |