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