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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 return GetCommandBuffer()->FlushSync(put_offset, state.get_offset); | 153 return GetCommandBuffer()->FlushSync(put_offset, state.get_offset); |
154 } | 154 } |
155 | 155 |
156 gpu::CommandBuffer::State PPB_Graphics3D_Impl::FlushSyncFast( | 156 gpu::CommandBuffer::State PPB_Graphics3D_Impl::FlushSyncFast( |
157 int32_t put_offset, | 157 int32_t put_offset, |
158 int32_t last_known_get) { | 158 int32_t last_known_get) { |
159 return GetCommandBuffer()->FlushSync(put_offset, last_known_get); | 159 return GetCommandBuffer()->FlushSync(put_offset, last_known_get); |
160 } | 160 } |
161 | 161 |
162 uint32_t PPB_Graphics3D_Impl::InsertSyncPoint() { | 162 uint32_t PPB_Graphics3D_Impl::InsertSyncPoint() { |
163 return GetCommandBuffer()->InsertSyncPoint(); | 163 return platform_context_->GetGpuControl()->InsertSyncPoint(); |
164 } | 164 } |
165 | 165 |
166 bool PPB_Graphics3D_Impl::BindToInstance(bool bind) { | 166 bool PPB_Graphics3D_Impl::BindToInstance(bool bind) { |
167 bound_to_instance_ = bind; | 167 bound_to_instance_ = bind; |
168 return true; | 168 return true; |
169 } | 169 } |
170 | 170 |
171 bool PPB_Graphics3D_Impl::IsOpaque() { | 171 bool PPB_Graphics3D_Impl::IsOpaque() { |
172 return platform_context_->IsOpaque(); | 172 return platform_context_->IsOpaque(); |
173 } | 173 } |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 PP_Instance this_pp_instance = pp_instance(); | 335 PP_Instance this_pp_instance = pp_instance(); |
336 const PPP_Graphics3D* ppp_graphics_3d = | 336 const PPP_Graphics3D* ppp_graphics_3d = |
337 static_cast<const PPP_Graphics3D*>( | 337 static_cast<const PPP_Graphics3D*>( |
338 instance->module()->GetPluginInterface( | 338 instance->module()->GetPluginInterface( |
339 PPP_GRAPHICS_3D_INTERFACE)); | 339 PPP_GRAPHICS_3D_INTERFACE)); |
340 if (ppp_graphics_3d) | 340 if (ppp_graphics_3d) |
341 ppp_graphics_3d->Graphics3DContextLost(this_pp_instance); | 341 ppp_graphics_3d->Graphics3DContextLost(this_pp_instance); |
342 } | 342 } |
343 | 343 |
344 } // namespace content | 344 } // namespace content |
OLD | NEW |