diff options
author | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-17 18:27:38 +0000 |
---|---|---|
committer | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-17 18:27:38 +0000 |
commit | 63c9b0574fc9a7d6420815b3eb64873ca50fe01b (patch) | |
tree | eeeb24ef1b2fa672eb72b2dcf12e295c0fa84888 /webkit/gpu | |
parent | e9c7bcfa90d8ed49bb11e1d31f95258d73f26c15 (diff) | |
download | chromium_src-63c9b0574fc9a7d6420815b3eb64873ca50fe01b.zip chromium_src-63c9b0574fc9a7d6420815b3eb64873ca50fe01b.tar.gz chromium_src-63c9b0574fc9a7d6420815b3eb64873ca50fe01b.tar.bz2 |
Allow GLES2CmdDecoder to change the GLSurface associated with the default FBO.
This is part 1. It can't actually be used yet because there are assumptions that the surface never changed.
It is intended to allow each renderer process to create only one command buffer for use by the compositor while being able to switch the surface between different windows, for examnple if a single renderer process handles multiple tabs of the same site.
Review URL: https://chromiumcodereview.appspot.com/10388131
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137693 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/gpu')
-rw-r--r-- | webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc b/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc index 6693a04..f82c022 100644 --- a/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc +++ b/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc @@ -424,10 +424,16 @@ bool GLInProcessContext::Initialize(const gfx::Size& size, return false; } + if (!context_->MakeCurrent(surface_.get())) { + LOG(ERROR) << "Could not make context current."; + Destroy(); + return false; + } + ::gpu::gles2::DisallowedFeatures disallowed_features; disallowed_features.swap_buffer_complete_callback = true; - if (!decoder_->Initialize(surface_.get(), - context_.get(), + if (!decoder_->Initialize(surface_, + context_, true, size, disallowed_features, |