summaryrefslogtreecommitdiffstats
path: root/gpu
diff options
context:
space:
mode:
authorapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-03 17:57:16 +0000
committerapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-03 17:57:16 +0000
commit6278880b2032063836a408a27a02e319448ac633 (patch)
treeb46f67202f000223f7cca5a3b39f4cebbd882384 /gpu
parentd8c7e3bc12a97f21ce23162293b37a1bf2c4febf (diff)
downloadchromium_src-6278880b2032063836a408a27a02e319448ac633.zip
chromium_src-6278880b2032063836a408a27a02e319448ac633.tar.gz
chromium_src-6278880b2032063836a408a27a02e319448ac633.tar.bz2
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
Diffstat (limited to 'gpu')
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder.cc9
1 files changed, 9 insertions, 0 deletions
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) {