| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #ifndef WEBKIT_GLUE_PLUGINS_PEPPER_GRAPHICS_3D_H_ | 5 #ifndef WEBKIT_GLUE_PLUGINS_PEPPER_GRAPHICS_3D_H_ |
| 6 #define WEBKIT_GLUE_PLUGINS_PEPPER_GRAPHICS_3D_H_ | 6 #define WEBKIT_GLUE_PLUGINS_PEPPER_GRAPHICS_3D_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/scoped_ptr.h" | 9 #include "base/scoped_ptr.h" |
| 10 #include "gfx/size.h" | 10 #include "gfx/size.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 static const PPB_Graphics3D_Dev* GetInterface(); | 34 static const PPB_Graphics3D_Dev* GetInterface(); |
| 35 static const PPB_OpenGLES_Dev* GetOpenGLESInterface(); | 35 static const PPB_OpenGLES_Dev* GetOpenGLESInterface(); |
| 36 | 36 |
| 37 static bool Shutdown(); | 37 static bool Shutdown(); |
| 38 | 38 |
| 39 static Graphics3D* GetCurrent(); | 39 static Graphics3D* GetCurrent(); |
| 40 | 40 |
| 41 static void ResetCurrent(); | 41 static void ResetCurrent(); |
| 42 | 42 |
| 43 // Resource override. | 43 // Resource override. |
| 44 virtual Graphics3D* AsGraphics3D() { | 44 virtual Graphics3D* AsGraphics3D(); |
| 45 return this; | |
| 46 } | |
| 47 | 45 |
| 48 bool Init(PP_Instance instance_id, int32_t config, | 46 bool Init(PP_Instance instance_id, int32_t config, |
| 49 const int32_t* attrib_list); | 47 const int32_t* attrib_list); |
| 50 | 48 |
| 51 // Associates this Graphics3D with the given plugin instance. You can pass | 49 // Associates this Graphics3D with the given plugin instance. You can pass |
| 52 // NULL to clear the existing device. Returns true on success. In this case, | 50 // NULL to clear the existing device. Returns true on success. In this case, |
| 53 // the last rendered frame is displayed. | 51 // the last rendered frame is displayed. |
| 54 // TODO(apatrick): Figure out the best semantics here. | 52 // TODO(apatrick): Figure out the best semantics here. |
| 55 bool BindToInstance(PluginInstance* new_instance); | 53 bool BindToInstance(PluginInstance* new_instance); |
| 56 | 54 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 81 scoped_ptr<PluginDelegate::PlatformContext3D> platform_context_; | 79 scoped_ptr<PluginDelegate::PlatformContext3D> platform_context_; |
| 82 | 80 |
| 83 // GLES2 Implementation instance. Owned by the platform context's GGL context. | 81 // GLES2 Implementation instance. Owned by the platform context's GGL context. |
| 84 gpu::gles2::GLES2Implementation* gles2_implementation_; | 82 gpu::gles2::GLES2Implementation* gles2_implementation_; |
| 85 }; | 83 }; |
| 86 | 84 |
| 87 } // namespace pepper | 85 } // namespace pepper |
| 88 | 86 |
| 89 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_GRAPHICS_3D_H_ | 87 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_GRAPHICS_3D_H_ |
| 90 | 88 |
| OLD | NEW |