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

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

Issue 2432413003: gpu, cmaa: add glApplyScreenSpaceAntialiasingCHROMIUM unittests (Closed)
Patch Set: Created 4 years, 2 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_decoder.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 62724d4adf612f220249efa6eea1f3b722e1c8cb..8ede3764a829fa3f6e6ddf362df5bc24d5786786 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -16628,6 +16628,22 @@ void GLES2DecoderImpl::DoCreateAndConsumeTextureINTERNAL(
}
void GLES2DecoderImpl::DoApplyScreenSpaceAntialiasingCHROMIUM() {
+ if (!feature_info_->feature_flags().chromium_screen_space_antialiasing) {
+ LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION,
+ "glApplyScreenSpaceAntialiasingCHROMIUM",
+ "command not supported");
+ return;
+ }
+
+ Framebuffer* bound_framebuffer =
+ GetFramebufferInfoForTarget(GL_DRAW_FRAMEBUFFER);
+ if (!bound_framebuffer) {
+ LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION,
+ "glApplyScreenSpaceAntialiasingCHROMIUM",
+ "no bound framebuffer object");
+ return;
+ }
+
// Apply CMAA(Conservative Morphological Anti-Aliasing) algorithm to the
// color attachments of currently bound draw framebuffer.
// Reference GL_INTEL_framebuffer_CMAA for details.
@@ -16650,8 +16666,7 @@ void GLES2DecoderImpl::DoApplyScreenSpaceAntialiasingCHROMIUM() {
return;
}
apply_framebuffer_attachment_cmaa_intel_
- ->ApplyFramebufferAttachmentCMAAINTEL(
- this, GetFramebufferInfoForTarget(GL_DRAW_FRAMEBUFFER));
+ ->ApplyFramebufferAttachmentCMAAINTEL(this, bound_framebuffer);
}
}

Powered by Google App Engine
This is Rietveld 408576698