summaryrefslogtreecommitdiffstats
path: root/content/browser/renderer_host/compositor_impl_android.cc
diff options
context:
space:
mode:
authordtrainor@chromium.org <dtrainor@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-27 20:35:00 +0000
committerdtrainor@chromium.org <dtrainor@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-27 20:35:00 +0000
commitc7872edee4401939930a980abd6933416714e5e5 (patch)
treecca181a57a234896b8a0397ca1a17805f2058e30 /content/browser/renderer_host/compositor_impl_android.cc
parentf77721ed5580e7014e751a3a92f0170024f247e6 (diff)
downloadchromium_src-c7872edee4401939930a980abd6933416714e5e5.zip
chromium_src-c7872edee4401939930a980abd6933416714e5e5.tar.gz
chromium_src-c7872edee4401939930a980abd6933416714e5e5.tar.bz2
Flush Context on UI Compositor GL commands
Make sure we call context->flush() during texture creation/destruction. This fixes the commands being executed until the page refreshes as they are not in the same queue as the actual ui compositor. So we had textures that were not actually built at draw time and had uninitialized resource handles. BUG= Review URL: https://chromiumcodereview.appspot.com/11411197 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@169727 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/renderer_host/compositor_impl_android.cc')
-rw-r--r--content/browser/renderer_host/compositor_impl_android.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/content/browser/renderer_host/compositor_impl_android.cc b/content/browser/renderer_host/compositor_impl_android.cc
index 837fbb5..e72ee85a 100644
--- a/content/browser/renderer_host/compositor_impl_android.cc
+++ b/content/browser/renderer_host/compositor_impl_android.cc
@@ -218,6 +218,7 @@ WebKit::WebGLId CompositorImpl::GenerateTexture(gfx::JavaBitmap& bitmap) {
format,
type,
bitmap.pixels());
+ context->flush();
DCHECK(context->getError() == GL_NO_ERROR);
return texture_id;
}
@@ -238,6 +239,7 @@ WebKit::WebGLId CompositorImpl::GenerateCompressedTexture(gfx::Size& size,
0,
data_size,
data);
+ context->flush();
DCHECK(context->getError() == GL_NO_ERROR);
return texture_id;
}
@@ -248,6 +250,7 @@ void CompositorImpl::DeleteTexture(WebKit::WebGLId texture_id) {
if (context->isContextLost())
return;
context->deleteTexture(texture_id);
+ context->flush();
DCHECK(context->getError() == GL_NO_ERROR);
}