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 "content/renderer/pepper/ppb_graphics_3d_impl.h" | 5 #include "content/renderer/pepper/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/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 uint32_t size, | 112 uint32_t size, |
113 int32_t* id) { | 113 int32_t* id) { |
114 return GetCommandBuffer()->CreateTransferBuffer(size, id); | 114 return GetCommandBuffer()->CreateTransferBuffer(size, id); |
115 } | 115 } |
116 | 116 |
117 PP_Bool PPB_Graphics3D_Impl::DestroyTransferBuffer(int32_t id) { | 117 PP_Bool PPB_Graphics3D_Impl::DestroyTransferBuffer(int32_t id) { |
118 GetCommandBuffer()->DestroyTransferBuffer(id); | 118 GetCommandBuffer()->DestroyTransferBuffer(id); |
119 return PP_TRUE; | 119 return PP_TRUE; |
120 } | 120 } |
121 | 121 |
122 PP_Bool PPB_Graphics3D_Impl::Flush(int32_t put_offset) { | 122 PP_Bool PPB_Graphics3D_Impl::Flush(int32_t put_offset, |
123 GetCommandBuffer()->Flush(put_offset); | 123 const std::vector<uint32>& sync_points) { |
| 124 GetCommandBuffer()->Flush(put_offset, sync_points); |
124 return PP_TRUE; | 125 return PP_TRUE; |
125 } | 126 } |
126 | 127 |
127 gpu::CommandBuffer::State PPB_Graphics3D_Impl::WaitForTokenInRange( | 128 gpu::CommandBuffer::State PPB_Graphics3D_Impl::WaitForTokenInRange( |
128 int32_t start, | 129 int32_t start, |
129 int32_t end) { | 130 int32_t end) { |
130 GetCommandBuffer()->WaitForTokenInRange(start, end); | 131 GetCommandBuffer()->WaitForTokenInRange(start, end); |
131 return GetCommandBuffer()->GetLastState(); | 132 return GetCommandBuffer()->GetLastState(); |
132 } | 133 } |
133 | 134 |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 instance->module()->GetPluginInterface(PPP_GRAPHICS_3D_INTERFACE)); | 380 instance->module()->GetPluginInterface(PPP_GRAPHICS_3D_INTERFACE)); |
380 // We have to check *again* that the instance exists, because it could have | 381 // We have to check *again* that the instance exists, because it could have |
381 // been deleted during GetPluginInterface(). Even the PluginModule could be | 382 // been deleted during GetPluginInterface(). Even the PluginModule could be |
382 // deleted, but in that case, the instance should also be gone, so the | 383 // deleted, but in that case, the instance should also be gone, so the |
383 // GetInstance check covers both cases. | 384 // GetInstance check covers both cases. |
384 if (ppp_graphics_3d && HostGlobals::Get()->GetInstance(this_pp_instance)) | 385 if (ppp_graphics_3d && HostGlobals::Get()->GetInstance(this_pp_instance)) |
385 ppp_graphics_3d->Graphics3DContextLost(this_pp_instance); | 386 ppp_graphics_3d->Graphics3DContextLost(this_pp_instance); |
386 } | 387 } |
387 | 388 |
388 } // namespace content | 389 } // namespace content |
OLD | NEW |