Bug 138951

Summary: [GTK] Fix the broken edge-distance antialiasing
Product: WebKit Reporter: JeongBong Seo <jb.seo>
Component: PlatformAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: bugs-noreply, cmarcelo, commit-queue, jb.seo, jdapena, kondapallykalyan, luiz, mcatanzaro, noam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
jb.seo: review+
after fix
none
before fix none

Description JeongBong Seo 2014-11-20 22:15:51 PST
There exist a wrong matrix multiply to get viewport space position.
---------------------------------------------------------------------------------
vec4 toViewportSpace(vec2 pos) { return vec4(pos, 0., 1.) * u_modelViewMatrix; }
---------------------------------------------------------------------------------
It generates wrong position and affects the inflation ratio to each vertices.
The transformation matrix should be left side.

After fix the multiplication, I got little strange result.
Anti-aliased layer's (inner) contents are expanded 1px.
But it shouldn't happen and only edge should be inflated.

Than I just erase the clamp function to create transformedTexCoord, and finally, got the good result.
But in theory clamping the position should be there, because we using GL_REPEAT in many case.

Please give me some idea or comment.
Comment 1 JeongBong Seo 2014-11-20 22:23:03 PST
Created attachment 242024 [details]
Patch
Comment 2 JeongBong Seo 2014-11-20 22:35:41 PST
Created attachment 242025 [details]
Patch
Comment 3 JeongBong Seo 2014-11-20 22:53:00 PST
Created attachment 242026 [details]
after fix
Comment 4 JeongBong Seo 2014-11-20 22:53:20 PST
Created attachment 242027 [details]
before fix
Comment 5 JeongBong Seo 2014-11-20 22:54:41 PST
TEST URL : https://bug-124653-attachments.webkit.org/attachment.cgi?id=217424
Comment 6 JeongBong Seo 2014-11-20 23:10:49 PST
Comment on attachment 242025 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=242025&action=review

> Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.cpp:-177
> -            vec4 clampedPosition = clamp(vec4(position, 0., 1.), 0., 1.);

I'm not sure eliminating the clamp function. But with clamp, it shows expanded output.
Comment 7 JeongBong Seo 2014-11-30 20:38:25 PST
anybody?