To the best of my knowledge, we only initiate a txn with non-default target for a BasicShadowableLayerManager when we do drawWindow(USE_WIDGET_LAYERS). This is what we want for reftests with omtc-not-OOP, and it's also what we want for drawWindow() when we're using omtc with only one |window| (as is the case with native fennec).
For OOP reftests however, the DrawToSurface() path is horrendously expensive, and unnecessary. (Although it doesn't hurt anything corretness-wise.) It's also wrong with OOP content that's embedded in a |window| in its parent: the DrawToSurface() will snapshot the entire window (AFAICT), not the child |window| that was requested. This would break drawWindow(USE_WIDGET_LAYERS) from within a content process.
I don't really care about drawWindow(USE_WIDGET_LAYERS) from content processes outside of reftests, but I don't want to slow down OOP reftests. So I have a patch that only does DrawToSurface() from the top-level process.
Created attachment 641402 [details] [diff] [review]
Only proxy drawing to a non-default target in BasicShadowableLayerManager, i.e. drawWindow(USE_WIDGET_LAYERS) for a content context, when the request is same-process