| Index: gpu/command_buffer/service/gles2_cmd_srgb_converter.cc
|
| diff --git a/gpu/command_buffer/service/gles2_cmd_srgb_converter.cc b/gpu/command_buffer/service/gles2_cmd_srgb_converter.cc
|
| index ffbaf3059e5384432e264139e5a5b321788246b6..949d2d081341379edc51159ca976cbb7df4dc3d4 100644
|
| --- a/gpu/command_buffer/service/gles2_cmd_srgb_converter.cc
|
| +++ b/gpu/command_buffer/service/gles2_cmd_srgb_converter.cc
|
| @@ -185,7 +185,8 @@ void SRGBConverter::Blit(
|
| GLenum src_framebuffer_type,
|
| GLuint dst_framebuffer,
|
| bool decode,
|
| - bool encode) {
|
| + bool encode,
|
| + bool enable_scissor_test) {
|
| // This function blits srgb image in src fb to srgb image in dst fb.
|
| // The steps are:
|
| // 1) Copy and crop pixels from source srgb image to the 1st texture(srgb).
|
| @@ -283,6 +284,10 @@ void SRGBConverter::Blit(
|
| } else {
|
| // Set approriate draw framebuffer if encoding is skipped.
|
| glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER, dst_framebuffer);
|
| +
|
| + if (enable_scissor_test) {
|
| + glEnable(GL_SCISSOR_TEST);
|
| + }
|
| }
|
|
|
| glBlitFramebuffer(
|
| @@ -309,6 +314,10 @@ void SRGBConverter::Blit(
|
| glBindTexture(GL_TEXTURE_2D, srgb_converter_textures_[0]);
|
| glBindVertexArrayOES(srgb_converter_vao_);
|
|
|
| + if (enable_scissor_test) {
|
| + glEnable(GL_SCISSOR_TEST);
|
| + }
|
| +
|
| glDrawArrays(GL_TRIANGLES, 0, 6);
|
| }
|
|
|
|
|