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 /gpu/demos/framework | |
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 'gpu/demos/framework')
-rw-r--r-- | gpu/demos/framework/window.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gpu/demos/framework/window.cc b/gpu/demos/framework/window.cc index 35b6ea9..e5274790 100644 --- a/gpu/demos/framework/window.cc +++ b/gpu/demos/framework/window.cc @@ -44,7 +44,7 @@ Window::~Window() { gles2_cmd_helper_.reset(); if (decoder_.get()) { - decoder_->Destroy(); + decoder_->Destroy(true); } } @@ -70,7 +70,7 @@ bool Window::CreateRenderContext(gfx::AcceleratedWidget hwnd) { return false; } - gpu::gles2::ContextGroup::Ref group(new gpu::gles2::ContextGroup(true)); + gpu::gles2::ContextGroup::Ref group(new gpu::gles2::ContextGroup(NULL, true)); decoder_.reset(gpu::gles2::GLES2Decoder::Create(group.get())); if (!decoder_.get()) @@ -91,6 +91,8 @@ bool Window::CreateRenderContext(gfx::AcceleratedWidget hwnd) { if (!context_.get()) return false; + context_->MakeCurrent(surface_); + std::vector<int32> attribs; if (!decoder_->Initialize(surface_.get(), context_.get(), |