summaryrefslogtreecommitdiffstats
path: root/gpu/gles2_conform_support
diff options
context:
space:
mode:
authorapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-17 18:27:38 +0000
committerapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-17 18:27:38 +0000
commit63c9b0574fc9a7d6420815b3eb64873ca50fe01b (patch)
treeeeeb24ef1b2fa672eb72b2dcf12e295c0fa84888 /gpu/gles2_conform_support
parente9c7bcfa90d8ed49bb11e1d31f95258d73f26c15 (diff)
downloadchromium_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/gles2_conform_support')
-rw-r--r--gpu/gles2_conform_support/egl/display.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/gpu/gles2_conform_support/egl/display.cc b/gpu/gles2_conform_support/egl/display.cc
index 54912d2..a81b2b1 100644
--- a/gpu/gles2_conform_support/egl/display.cc
+++ b/gpu/gles2_conform_support/egl/display.cc
@@ -109,6 +109,8 @@ EGLSurface Display::CreateWindowSurface(EGLConfig config,
if (!gl_context_.get())
return EGL_NO_SURFACE;
+ gl_context_->MakeCurrent(gl_surface_);
+
std::vector<int32> attribs;
if (!decoder_->Initialize(gl_surface_.get(),
gl_context_.get(),
@@ -147,7 +149,7 @@ void Display::DestroySurface(EGLSurface surface) {
DCHECK(IsValidSurface(surface));
gpu_scheduler_.reset();
if (decoder_.get()) {
- decoder_->Destroy();
+ decoder_->Destroy(true);
}
decoder_.reset();
gl_surface_ = NULL;