Looks like we are not dropping front buffer if content type is different. OGL/Basic, Shadow layers are affected
Created attachment 567810 [details] [diff] [review] Reset front buffer if content type has changed
I think we need to also include part of the changes from https://bugzilla.mozilla.org/attachment.cgi?id=567936&action=diff here. This patch deletes the front buffer if the new front buffer has a different content type. We also need to detect the actual content type change on the child side, and create a new backbuffer before this code will ever be hit. With this change, the BasicLayers changes are unnecessary since we will delete this buffer on the next frame paint. Though probably still a good idea.
Created attachment 567955 [details] [diff] [review] Reset all buffers if ContentType has changed Added in the check on the backbuffer side.
Is this leading to bugs in the field (seems like it could!), and/or is it breaking bug 695275? If the former, we need tests here.
Comment on attachment 567955 [details] [diff] [review] Reset all buffers if ContentType has changed I assume this obsoletes the previous patch?
Comment on attachment 567810 [details] [diff] [review] Reset front buffer if content type has changed yes, it is obsolete
Just the latter. I'm not sure how to test this exactly, nsDisplayImages are always marked as being transparent, we only hit this bug in the weird case that theres an empty visible region (and thus empty transparent region), but still decide to create the image layer. Constructing a test that relies on this edge case doesn't sound great.
I backed out and relanded this to investigate an orange, thus the real final changeset is https://hg.mozilla.org/mozilla-central/rev/75eaad17724f