Samsung / skia

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incorrect output for skia when fSampleCnt!=4

chevalam opened this issue · comments

Skia does not have the quality/correctness as cairo has.

If turn off fSampleCount = 4, skia uses GrSoftwarePathRenderer to render the path into a SkPitmap, and upload that to a texture. Unfortunately, Skia uses GL_RED when glTexImage2D(), this is not supported in GLES 3/GLES2 - that results in fail. I have changed that to GL_ALPHA, but still nothing comes out - need to dig more.

If turn on fSampleCount = 4, skia use stencil buffer as mask - same flow path as fill curve - that is not correct either.

Hi, Srikanth

Since our target is msaa capable, our highest priority is fixing bugs for msaa target and optimization. The reason that msaa target output is incorrect is the way how skia uses stencil buffer to mask the path. In case of non-msaa target, skia uses GrSoftwarePathRenderer to draw the path into a SkBitmap and uloads it to a texture. During uploading, it uses GL_RED as format, which is not supported.

Thanks
Henry


Hi Henry ,

Some observations on the output discrepancies with and without fSampleCount = 4.

  1. The issue is observed only with setAntiAlias(true). If antialias is not set then output is properly drawn and matches with fSampleCount=4.
    This is because GrDefaultPathRenderer::canDrawPath() returns false for antiAlias=true and no ouput is drawn.
  2. Also the no output is with fSampleCount=0 is observed with mesa 9.1 and higher. mesa 8.0 draws a different output but not a blank screen.

I am debugging on the first observed and will keep you updated.

Regards,
Srikanth.