diff options
author | piman <piman@chromium.org> | 2014-11-06 18:30:01 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-11-07 02:30:28 +0000 |
commit | 360175c06135c8b85095283c280e9e568b80e41b (patch) | |
tree | 70074d77755f766dc5c81f298aa4bf10fde4d68b /content/renderer/pepper/ppb_graphics_3d_impl.cc | |
parent | 6ebc782bb4feeb62fb40319cd462e0409db06620 (diff) | |
download | chromium_src-360175c06135c8b85095283c280e9e568b80e41b.zip chromium_src-360175c06135c8b85095283c280e9e568b80e41b.tar.gz chromium_src-360175c06135c8b85095283c280e9e568b80e41b.tar.bz2 |
Implement PpapiCommandBufferProxy::GetCapabilities
This is just piping gpu::Capabilities through the initialization patch.
For that, I needed to move the IPC traits for gpu::Capabilities from
content/ to gpu/ipc/ so that we can use it in ppapi/proxy.
BUG=325391
Review URL: https://codereview.chromium.org/706533002
Cr-Commit-Position: refs/heads/master@{#303164}
Diffstat (limited to 'content/renderer/pepper/ppb_graphics_3d_impl.cc')
-rw-r--r-- | content/renderer/pepper/ppb_graphics_3d_impl.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/content/renderer/pepper/ppb_graphics_3d_impl.cc b/content/renderer/pepper/ppb_graphics_3d_impl.cc index 7111f56..12d1db9 100644 --- a/content/renderer/pepper/ppb_graphics_3d_impl.cc +++ b/content/renderer/pepper/ppb_graphics_3d_impl.cc @@ -85,6 +85,7 @@ PP_Resource PPB_Graphics3D_Impl::CreateRaw( 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) { @@ -95,7 +96,8 @@ PP_Resource PPB_Graphics3D_Impl::CreateRaw( } 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(); } @@ -211,7 +213,7 @@ int32 PPB_Graphics3D_Impl::DoSwapBuffers() { 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; @@ -226,6 +228,7 @@ bool PPB_Graphics3D_Impl::Init(PPB_Graphics3D_API* share_context, 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()); @@ -297,6 +300,8 @@ bool PPB_Graphics3D_Impl::InitRaw( 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; |