PP_Instance instance,
PP_Resource share_context,
const int32_t* attrib_list,
+ gpu::Capabilities* capabilities,
base::SharedMemoryHandle* shared_state_handle) {
PPB_Graphics3D_API* share_api = NULL;
if (share_context) {
}
scoped_refptr<PPB_Graphics3D_Impl> graphics_3d(
new PPB_Graphics3D_Impl(instance));
- if (!graphics_3d->InitRaw(share_api, attrib_list, shared_state_handle))
+ if (!graphics_3d->InitRaw(share_api, attrib_list, capabilities,
+ shared_state_handle))
return 0;
return graphics_3d->GetReference();
}
commit_pending_ = true;
} else {
// Wait for the command to complete on the GPU to allow for throttling.
- command_buffer_->Echo(base::Bind(&PPB_Graphics3D_Impl::OnSwapBuffers,
- weak_ptr_factory_.GetWeakPtr()));
+ command_buffer_->SignalSyncPoint(
+ sync_point_,
+ base::Bind(&PPB_Graphics3D_Impl::OnSwapBuffers,
+ weak_ptr_factory_.GetWeakPtr()));
}
return PP_OK_COMPLETIONPENDING;
bool PPB_Graphics3D_Impl::Init(PPB_Graphics3D_API* share_context,
const int32_t* attrib_list) {
- if (!InitRaw(share_context, attrib_list, NULL))
+ if (!InitRaw(share_context, attrib_list, NULL, NULL))
return false;
gpu::gles2::GLES2Implementation* share_gles2 = NULL;
bool PPB_Graphics3D_Impl::InitRaw(
PPB_Graphics3D_API* share_context,
const int32_t* attrib_list,
+ gpu::Capabilities* capabilities,
base::SharedMemoryHandle* shared_state_handle) {
PepperPluginInstanceImpl* plugin_instance =
HostGlobals::Get()->GetInstance(pp_instance());
return false;
if (shared_state_handle)
*shared_state_handle = command_buffer_->GetSharedStateHandle();
+ if (capabilities)
+ *capabilities = command_buffer_->GetCapabilities();
mailbox_ = gpu::Mailbox::Generate();
if (!command_buffer_->ProduceFrontBuffer(mailbox_))
return false;