diff options
author | kbr@chromium.org <kbr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-09 03:40:04 +0000 |
---|---|---|
committer | kbr@chromium.org <kbr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-09 03:40:04 +0000 |
commit | 8c515f8612a8449f26345c062a8ebda1f3c7b81f (patch) | |
tree | adf3487f9690e779cd508afd2798b95832b43f7d /gpu | |
parent | 071570ef263a36293755bac698c53fa599a07655 (diff) | |
download | chromium_src-8c515f8612a8449f26345c062a8ebda1f3c7b81f.zip chromium_src-8c515f8612a8449f26345c062a8ebda1f3c7b81f.tar.gz chromium_src-8c515f8612a8449f26345c062a8ebda1f3c7b81f.tar.bz2 |
Re-add setting of wrap and filtering mode parameters of backing
texture of command buffer offscreen contexts, and properly track these
states in the TextureManager. Using code does not have the opportunity
to set these parameters before it is determined that the backing
framebuffer is incomplete.
Ran WebGL content on Linux to verify fix.
BUG=62432
TEST=none
Review URL: http://codereview.chromium.org/4670002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65487 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu')
-rw-r--r-- | gpu/command_buffer/service/gles2_cmd_decoder.cc | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc index 44f97e3..559c2ef 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc @@ -1511,6 +1511,10 @@ bool Texture::AllocateStorage(const gfx::Size& size, GLenum format) { DCHECK_NE(id_, 0u); ScopedGLErrorSuppressor suppressor(decoder_); ScopedTexture2DBinder binder(decoder_, id_); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + 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); glTexImage2D(GL_TEXTURE_2D, 0, // mip level @@ -2336,6 +2340,26 @@ bool GLES2DecoderImpl::UpdateOffscreenFrameBufferSize() { 0, // border GL_RGBA, GL_UNSIGNED_BYTE); + texture_manager()->SetParameter( + feature_info_, + info, + GL_TEXTURE_MAG_FILTER, + GL_NEAREST); + texture_manager()->SetParameter( + feature_info_, + info, + GL_TEXTURE_MIN_FILTER, + GL_NEAREST); + texture_manager()->SetParameter( + feature_info_, + info, + GL_TEXTURE_WRAP_S, + GL_CLAMP_TO_EDGE); + texture_manager()->SetParameter( + feature_info_, + info, + GL_TEXTURE_WRAP_T, + GL_CLAMP_TO_EDGE); // Clear the offscreen color texture. { |