summaryrefslogtreecommitdiffstats
path: root/chrome/renderer
diff options
context:
space:
mode:
authorvangelis@chromium.org <vangelis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-22 19:27:28 +0000
committervangelis@chromium.org <vangelis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-22 19:27:28 +0000
commit25158152300deccafb3ca928576e2568107979f1 (patch)
tree88b7f7769802d49d7e21b1998dab0d4011d54de0 /chrome/renderer
parent9dedd9687ceb7eed731f689dd646ad6c123b926b (diff)
downloadchromium_src-25158152300deccafb3ca928576e2568107979f1.zip
chromium_src-25158152300deccafb3ca928576e2568107979f1.tar.gz
chromium_src-25158152300deccafb3ca928576e2568107979f1.tar.bz2
When creating a child ggl context, flush commands in the parent context first before attempting
to get a texture id to make sure that the id's stay consistent. Review URL: http://codereview.chromium.org/2846021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50501 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-rw-r--r--chrome/renderer/ggl/ggl.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome/renderer/ggl/ggl.cc b/chrome/renderer/ggl/ggl.cc
index 8bc0177..d925fe2 100644
--- a/chrome/renderer/ggl/ggl.cc
+++ b/chrome/renderer/ggl/ggl.cc
@@ -124,6 +124,10 @@ bool Context::Initialize(gfx::NativeViewId view, const gfx::Size& size) {
// Allocate a frame buffer ID with respect to the parent.
if (parent_) {
+ // Flush any remaining commands in the parent context to make sure the
+ // texture id accounting stays consistent.
+ int32 token = parent_->gles2_helper_->InsertToken();
+ parent_->gles2_helper_->WaitForToken(token);
parent_texture_id_ = parent_->gles2_implementation_->MakeTextureId();
}