Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(236)

Unified Diff: gpu/command_buffer/service/gles2_cmd_srgb_converter.cc

Issue 2362163003: [Command buffer] blitFramebuffer should not disable scissor test (Closed)
Patch Set: Fix bots failure: we don't disable scissor test deliberately now Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
}

Powered by Google App Engine
This is Rietveld 408576698