| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_graphics_3d_impl.h" | 5 #include "webkit/plugins/ppapi/ppb_graphics_3d_impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 s.generation | 64 s.generation |
| 65 }; | 65 }; |
| 66 return state; | 66 return state; |
| 67 } | 67 } |
| 68 } // namespace. | 68 } // namespace. |
| 69 | 69 |
| 70 PPB_Graphics3D_Impl::PPB_Graphics3D_Impl(PP_Instance instance) | 70 PPB_Graphics3D_Impl::PPB_Graphics3D_Impl(PP_Instance instance) |
| 71 : PPB_Graphics3D_Shared(instance), | 71 : PPB_Graphics3D_Shared(instance), |
| 72 bound_to_instance_(false), | 72 bound_to_instance_(false), |
| 73 commit_pending_(false), | 73 commit_pending_(false), |
| 74 weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { | 74 weak_ptr_factory_(this) { |
| 75 } | 75 } |
| 76 | 76 |
| 77 PPB_Graphics3D_Impl::~PPB_Graphics3D_Impl() { | 77 PPB_Graphics3D_Impl::~PPB_Graphics3D_Impl() { |
| 78 DestroyGLES2Impl(); | 78 DestroyGLES2Impl(); |
| 79 } | 79 } |
| 80 | 80 |
| 81 // static | 81 // static |
| 82 PP_Bool PPB_Graphics3D_Impl::IsGpuBlacklisted() { | 82 PP_Bool PPB_Graphics3D_Impl::IsGpuBlacklisted() { |
| 83 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 83 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| 84 if (command_line) | 84 if (command_line) |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 const PPP_Graphics3D* ppp_graphics_3d = | 334 const PPP_Graphics3D* ppp_graphics_3d = |
| 335 static_cast<const PPP_Graphics3D*>( | 335 static_cast<const PPP_Graphics3D*>( |
| 336 instance->module()->GetPluginInterface( | 336 instance->module()->GetPluginInterface( |
| 337 PPP_GRAPHICS_3D_INTERFACE)); | 337 PPP_GRAPHICS_3D_INTERFACE)); |
| 338 if (ppp_graphics_3d) | 338 if (ppp_graphics_3d) |
| 339 ppp_graphics_3d->Graphics3DContextLost(pp_instance()); | 339 ppp_graphics_3d->Graphics3DContextLost(pp_instance()); |
| 340 } | 340 } |
| 341 | 341 |
| 342 } // namespace ppapi | 342 } // namespace ppapi |
| 343 } // namespace webkit | 343 } // namespace webkit |
| OLD | NEW |