Coalescing upload region can cause us to try to upload outside the valid region. This happens when we get two paints from a layer at different offset back-to-back before we process the upload. We have to be careful that we only try to upload the region that is valid when coalescing these regions.
Created attachment 625196 [details] [diff] [review] Patch Since BenWa pretty much wrote this patch, asking ali for a review
Comment on attachment 625196 [details] [diff] [review] Patch Review of attachment 625196 [details] [diff] [review]: ----------------------------------------------------------------- ::: gfx/layers/opengl/TiledThebesLayerOGL.cpp @@ +167,5 @@ > } > > + // If we coalesce uploads while the layers' valid region is changing we will > + // end up trying to upload area outside of the valid region. (bug 756555) > + mRegionToUpload = mRegionToUpload.And(mRegionToUpload, mMainMemoryTiledBuffer.GetValidRegion()); The assignment is just self-assignment here, so it isn't needed.
Kats, the reason these API return 'this' is to allow chaining X.And(...).Or(...).
Landed on inbound with the assignment part removed: https://hg.mozilla.org/integration/mozilla-inbound/rev/ab3f805f3210 (In reply to Benoit Girard (:BenWa) from comment #3) > Kats, the reason these API return 'this' is to allow chaining > X.And(...).Or(...). That makes sense, but I still don't think it makes sense to be passing in the object itself as the first parameter. That's just confusing :)
Also noming for fennec blocker; this prevents a crash (I was able to reproduce the crash pretty easily by panning around on http://www.bbc.co.uk/persian/mobile/index.shtml with the patches from bug 748384 applied on the SGS 2).
(In reply to Kartikaya Gupta (:kats) from comment #4) Agreed :)
5 years ago
Comment on attachment 625196 [details] [diff] [review] Patch [Approval Request Comment] Bug caused by (feature/regressing bug #): 739679 User impact if declined: possible crash in some cases Testing completed (on m-c, etc.): on m-c Risk to taking this patch (and alternatives if risky): low-risk String or UUID changes made by this patch: none