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

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

Issue 2120293002: gpu, cmaa: Don't blend isolated L shape because it's not a closed geometry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc b/gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc
index d22ad0662191cf367ee1417d4c717d7f5af3a22d..c0b6cda803718645aadddab4fb50a28aab31f0cb 100644
--- a/gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc
+++ b/gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc
@@ -1566,6 +1566,34 @@ const char ApplyFramebufferAttachmentCMAAINTELResourceManager::cmaa_frag_s2_[] =
bool(packedEdgesB & 0x04u);
if (large_l1 || large_l2 || large_l3 || large_l4)
continue;
+
+ // Don't blend isolated L shape because it's not a closed geometry.
+ // isolated_l1 isolated_l2 isolated_l3 isolated_l4
+ // _ _
+ // X| X| |X |X
+ // ¯¯ ¯¯
+ bool isolated_l1 = (packedEdgesC == (0x01u | 0x02u)) &&
+ bool((packedEdgesL & 0x02u) == 0x00u) &&
Zhenyao Mo 2016/07/05 01:47:27 I didn't review the original CLs, but chrome doesn
Zhenyao Mo 2016/07/05 01:50:39 Never mind. Just realized it's shader source, so
dshwang 2016/07/05 11:41:26 Yes, I will apply clang-format.
+ bool((packedEdgesT & 0x04u) == 0x00u) &&
+ bool((packedEdgesR & 0x08u) == 0x00u) &&
+ bool((packedEdgesB & 0x01u) == 0x00u);
+ bool isolated_l2 = (packedEdgesC == (0x01u | 0x08u)) &&
+ bool((packedEdgesL & 0x08u) == 0x00u) &&
+ bool((packedEdgesT & 0x01u) == 0x00u) &&
+ bool((packedEdgesR & 0x02u) == 0x00u) &&
+ bool((packedEdgesB & 0x04u) == 0x00u);
+ bool isolated_l3 = (packedEdgesC == (0x04u | 0x08u)) &&
+ bool((packedEdgesL & 0x02u) == 0x00u) &&
+ bool((packedEdgesT & 0x04u) == 0x00u) &&
+ bool((packedEdgesR & 0x08u) == 0x00u) &&
+ bool((packedEdgesB & 0x01u) == 0x00u);
+ bool isolated_l4 = (packedEdgesC == (0x02u | 0x04u)) &&
+ bool((packedEdgesL & 0x08u) == 0x00u) &&
+ bool((packedEdgesT & 0x01u) == 0x00u) &&
+ bool((packedEdgesR & 0x02u) == 0x00u) &&
+ bool((packedEdgesB & 0x04u) == 0x00u);
+ if (isolated_l1 || isolated_l2 || isolated_l3 || isolated_l4)
+ continue;
}
// 2.) U-like shape (surrounded with edges from 3 sides)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698