Index: Source/platform/graphics/gpu/DrawingBuffer.cpp |
diff --git a/Source/platform/graphics/gpu/DrawingBuffer.cpp b/Source/platform/graphics/gpu/DrawingBuffer.cpp |
index f4d21767f72f093370f435a7a7faef2ea12eb3f1..f8ad4ec371d5488091633183e50593efffe73bd8 100644 |
--- a/Source/platform/graphics/gpu/DrawingBuffer.cpp |
+++ b/Source/platform/graphics/gpu/DrawingBuffer.cpp |
@@ -434,8 +434,12 @@ bool DrawingBuffer::initialize(const IntSize& size) |
if (m_requestedAttributes.antialias && m_multisampleExtensionSupported) { |
m_context->getIntegerv(GL_MAX_SAMPLES_ANGLE, &maxSampleCount); |
m_multisampleMode = ExplicitResolve; |
- if (m_extensionsUtil->supportsExtension("GL_EXT_multisampled_render_to_texture")) |
+ if (m_extensionsUtil->supportsExtension("GL_EXT_multisampled_render_to_texture")) { |
m_multisampleMode = ImplicitResolve; |
+ } |
+ if (m_extensionsUtil->supportsExtension("GL_INTEL_framebuffer_CMAA")) { |
bajones
2015/08/19 16:26:44
Nit: This should be an `else if`
Ken Russell (switch to Gerrit)
2015/08/19 17:56:18
Or does the Intel hardware supporting INTEL_frameb
|
+ m_multisampleMode = INTELCMAAResolve; |
piman
2015/08/19 16:36:51
drive-by nit: CMAA is not multisampling, maybe ren
Ken Russell (switch to Gerrit)
2015/08/19 17:56:18
I like Antoine's suggestion. Could you please make
|
+ } |
} |
m_sampleCount = std::min(4, maxSampleCount); |
@@ -815,6 +819,11 @@ void DrawingBuffer::commit() |
} |
m_context->bindFramebuffer(GL_FRAMEBUFFER, m_fbo); |
+ if (m_multisampleMode == INTELCMAAResolve) { |
+ // Apply CMAA(Conservative Morphological Anti-Aliasing) algorithm to the color buffer of m_fbo. |
+ // Reference: https://software.intel.com/en-us/articles/conservative-morphological-anti-aliasing-cmaa |
+ m_context->applyFramebufferAttachmentCMAAINTEL(); |
+ } |
m_contentsChangeCommitted = true; |
} |