diff options
Diffstat (limited to 'gpu/command_buffer/service/gles2_cmd_decoder.cc')
-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. { |