| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "webkit/plugins/ppapi/ppb_surface_3d_impl.h" | 5 #include "webkit/plugins/ppapi/ppb_surface_3d_impl.h" |
| 6 | 6 |
| 7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
| 8 #include "gpu/command_buffer/client/gles2_implementation.h" | 8 #include "gpu/command_buffer/client/gles2_implementation.h" |
| 9 #include "gpu/command_buffer/common/command_buffer.h" | 9 #include "gpu/command_buffer/common/command_buffer.h" |
| 10 #include "ppapi/c/ppb_graphics_3d.h" | 10 #include "ppapi/c/dev/ppb_graphics_3d_dev.h" |
| 11 #include "ppapi/c/ppp_graphics_3d.h" | 11 #include "ppapi/c/dev/ppp_graphics_3d_dev.h" |
| 12 #include "webkit/plugins/ppapi/common.h" | 12 #include "webkit/plugins/ppapi/common.h" |
| 13 #include "webkit/plugins/ppapi/plugin_module.h" | 13 #include "webkit/plugins/ppapi/plugin_module.h" |
| 14 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" | 14 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" |
| 15 #include "webkit/plugins/ppapi/ppb_context_3d_impl.h" | 15 #include "webkit/plugins/ppapi/ppb_context_3d_impl.h" |
| 16 #include "webkit/plugins/ppapi/resource_helper.h" | 16 #include "webkit/plugins/ppapi/resource_helper.h" |
| 17 | 17 |
| 18 using ppapi::thunk::PPB_Surface3D_API; | 18 using ppapi::thunk::PPB_Surface3D_API; |
| 19 | 19 |
| 20 namespace webkit { | 20 namespace webkit { |
| 21 namespace ppapi { | 21 namespace ppapi { |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 } | 173 } |
| 174 | 174 |
| 175 void PPB_Surface3D_Impl::SendContextLost() { | 175 void PPB_Surface3D_Impl::SendContextLost() { |
| 176 PluginInstance* plugin_instance = ResourceHelper::GetPluginInstance(this); | 176 PluginInstance* plugin_instance = ResourceHelper::GetPluginInstance(this); |
| 177 | 177 |
| 178 // By the time we run this, the instance may have been deleted, or in the | 178 // By the time we run this, the instance may have been deleted, or in the |
| 179 // process of being deleted. Even in the latter case, we don't want to send a | 179 // process of being deleted. Even in the latter case, we don't want to send a |
| 180 // callback after DidDestroy. | 180 // callback after DidDestroy. |
| 181 if (!plugin_instance || !plugin_instance->container()) | 181 if (!plugin_instance || !plugin_instance->container()) |
| 182 return; | 182 return; |
| 183 const PPP_Graphics3D* ppp_graphics_3d = | 183 const PPP_Graphics3D_Dev* ppp_graphics_3d = |
| 184 static_cast<const PPP_Graphics3D*>( | 184 static_cast<const PPP_Graphics3D_Dev*>( |
| 185 plugin_instance->module()->GetPluginInterface( | 185 plugin_instance->module()->GetPluginInterface( |
| 186 PPP_GRAPHICS_3D_INTERFACE)); | 186 PPP_GRAPHICS_3D_DEV_INTERFACE)); |
| 187 if (ppp_graphics_3d) | 187 if (ppp_graphics_3d) |
| 188 ppp_graphics_3d->Graphics3DContextLost(pp_instance()); | 188 ppp_graphics_3d->Graphics3DContextLost(pp_instance()); |
| 189 } | 189 } |
| 190 | 190 |
| 191 } // namespace ppapi | 191 } // namespace ppapi |
| 192 } // namespace webkit | 192 } // namespace webkit |
| OLD | NEW |