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

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

Issue 2432413003: gpu, cmaa: add glApplyScreenSpaceAntialiasingCHROMIUM unittests (Closed)
Patch Set: fix linux_chromium_rel_ng 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 f6c5916e198bec66ef77b65ba17b3988f8d5858c..f905150914dc9b513738a3901fcc9cca35ecff90 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -16776,6 +16776,17 @@ void GLES2DecoderImpl::DoCreateAndConsumeTextureINTERNAL(
}
void GLES2DecoderImpl::DoApplyScreenSpaceAntialiasingCHROMIUM() {
+ Framebuffer* bound_framebuffer =
+ GetFramebufferInfoForTarget(GL_DRAW_FRAMEBUFFER);
+ // TODO(dshwang): support it even after glBindFrameBuffer(GL_FRAMEBUFFER, 0).
+ // skia will need to render to the window. crbug.com/656618
+ 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.
@@ -16798,8 +16809,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