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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 GetCommandBuffer()->FlushSync(put_offset, state.get_offset)); | 169 GetCommandBuffer()->FlushSync(put_offset, state.get_offset)); |
170 } | 170 } |
171 | 171 |
172 PP_Graphics3DTrustedState PPB_Graphics3D_Impl::FlushSyncFast( | 172 PP_Graphics3DTrustedState PPB_Graphics3D_Impl::FlushSyncFast( |
173 int32_t put_offset, | 173 int32_t put_offset, |
174 int32_t last_known_get) { | 174 int32_t last_known_get) { |
175 return PPStateFromGPUState( | 175 return PPStateFromGPUState( |
176 GetCommandBuffer()->FlushSync(put_offset, last_known_get)); | 176 GetCommandBuffer()->FlushSync(put_offset, last_known_get)); |
177 } | 177 } |
178 | 178 |
| 179 uint32_t PPB_Graphics3D_Impl::InsertSyncPoint() { |
| 180 return GetCommandBuffer()->InsertSyncPoint(); |
| 181 } |
| 182 |
179 bool PPB_Graphics3D_Impl::BindToInstance(bool bind) { | 183 bool PPB_Graphics3D_Impl::BindToInstance(bool bind) { |
180 bound_to_instance_ = bind; | 184 bound_to_instance_ = bind; |
181 return true; | 185 return true; |
182 } | 186 } |
183 | 187 |
184 unsigned int PPB_Graphics3D_Impl::GetBackingTextureId() { | 188 unsigned int PPB_Graphics3D_Impl::GetBackingTextureId() { |
185 return platform_context_->GetBackingTextureId(); | 189 return platform_context_->GetBackingTextureId(); |
186 } | 190 } |
187 | 191 |
188 bool PPB_Graphics3D_Impl::IsOpaque() { | 192 bool PPB_Graphics3D_Impl::IsOpaque() { |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 const PPP_Graphics3D* ppp_graphics_3d = | 334 const PPP_Graphics3D* ppp_graphics_3d = |
331 static_cast<const PPP_Graphics3D*>( | 335 static_cast<const PPP_Graphics3D*>( |
332 instance->module()->GetPluginInterface( | 336 instance->module()->GetPluginInterface( |
333 PPP_GRAPHICS_3D_INTERFACE)); | 337 PPP_GRAPHICS_3D_INTERFACE)); |
334 if (ppp_graphics_3d) | 338 if (ppp_graphics_3d) |
335 ppp_graphics_3d->Graphics3DContextLost(pp_instance()); | 339 ppp_graphics_3d->Graphics3DContextLost(pp_instance()); |
336 } | 340 } |
337 | 341 |
338 } // namespace ppapi | 342 } // namespace ppapi |
339 } // namespace webkit | 343 } // namespace webkit |
OLD | NEW |