Created attachment 564201 [details] [diff] [review]
Always use nearest filtering
With GL layers enabled on Android, several reftests are failing (Bug 676831 flagged many such tests). It turns out that virtually all of these failures are caused by pixel values having one or more channels off by 4 or 8 (e.g., instead of (255,255,255), we get (247,255,247)).
Interestingly, if we require GL to always use nearest (rather than linear) filtering, all but one of the reftest failures are resolved. We wouldn't want to land such a change since, among other things, it makes zooming look ugly, but this might help point us in the direction of the real problem.
What happens if you turn off the MOZ_GFX_OPTIMIZE_MOBILE => nearest hacks in bug 688104?
(In reply to Chris Jones [:cjones] [:warhammer] from comment #1)
> What happens if you turn off the MOZ_GFX_OPTIMIZE_MOBILE => nearest hacks in
> bug 688104?
Even with those hacks turned off, we get the same problem.
Created attachment 564666 [details]
Log for reftest analyzer
The problem seems to be caused by the use of LINEAR filter with TiledTextureImage with large textures. The following patch changes the leakage to a clear pattern on the right edge of the rectangle.
- mTileSize = mGL->GetMaxTextureSize();
+ mTileSize = 512;//mGL->GetMaxTextureSize();
Created attachment 565033 [details]
Log with 512 max TiledTextureImage
And the test passes with a 256 tile size.
Created attachment 565349 [details] [diff] [review]
Posting some shader hacking that I worked on with Jeff to get an idea of what is going on. Our general belief is that it is related to precision but we don't understand the problem.
Created attachment 565391 [details] [diff] [review]
More of a work around then a fix unfortunately.
Created attachment 566380 [details] [diff] [review]
Enable test fix by patch
With these two patch applied we fail 3 tests and pass 3 test that !layerOpenGL fails.
~/mozilla/mozilla-central/tree> find . -name "reftest.list" | xargs grep "Android&&"
./layout/reftests/text-overflow/reftest.list:fails-if(Android&&layersOpenGL) HTTP(..) == block-padding.html block-padding-ref.html
./layout/reftests/canvas/reftest.list:fails-if(Android&&layersOpenGL) == image-rendering-test.html image-rendering-ref.html
./layout/reftests/canvas/reftest.list:fails-if(Android&&layersOpenGL) == image-shadow.html image-shadow-ref.html
./layout/reftests/svg/reftest.list:fails-if(Android&&!layersOpenGL) == dynamic-conditions-01.svg pass.svg # bug 652050
./layout/reftests/svg/reftest.list:fails-if(Android&&!layersOpenGL) == dynamic-switch-01.svg pass.svg # bug 652050
./layout/reftests/svg/reftest.list:fails-if(Android&&!layersOpenGL) == switch-01.svg pass.svg # bug 652050
Created attachment 567165 [details] [diff] [review]
patch v2 (handle 3d transforms)
Created attachment 567168 [details] [diff] [review]
patch v3 (handle 3d transforms)
Still need to land test changes. I was waiting on TBPL results to compare my local results with tinderbox, currently the tree is closed.
merged follow-up as well https://hg.mozilla.org/mozilla-central/rev/6688e7c9cd8f