From 6278880b2032063836a408a27a02e319448ac633 Mon Sep 17 00:00:00 2001 From: "apatrick@chromium.org" Date: Mon, 3 Oct 2011 17:57:16 +0000 Subject: From comment: // TODO(apatrick): Attempt to diagnose crbug.com/97775. If SwapBuffers is // never called on an offscreen context, no data will ever be uploaded to the // saved offscreen color texture (it is deferred until to when SwapBuffers // is called). My idea is that some nvidia drivers might have a bug where // deleting a texture that has never has not been populated might cause a // crash. In the context of bug 97775, the uptime is very short. It is possible that SwapBuffers is never being called on the view context, which on mac is actually an offscreen context. This is a bit a shot in the dark but I haven't reproduced it. BUG=97775 Review URL: http://codereview.chromium.org/8089006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103746 0039d316-1c4b-4281-b951-d872f2087c98 --- gpu/command_buffer/service/gles2_cmd_decoder.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'gpu') diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc index 5ea27fd..cf9ee5b 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc @@ -1478,6 +1478,15 @@ void Texture::Create() { glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + + // TODO(apatrick): Attempt to diagnose crbug.com/97775. If SwapBuffers is + // never called on an offscreen context, no data will ever be uploaded to the + // saved offscreen color texture (it is deferred until to when SwapBuffers + // is called). My idea is that some nvidia drivers might have a bug where + // deleting a texture that has never been populated might cause a + // crash. + glTexImage2D( + GL_TEXTURE_2D, 0, GL_RGBA, 16, 16, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL); } bool Texture::AllocateStorage(const gfx::Size& size, GLenum format) { -- cgit v1.1