Bug 1143575. Android's screenshotting code should invalidate the LayerManagerComposite to ensure composition will actually happen. r=nical
There is some ambiguity about whether ScheduleComposite will necessarily trigger a composite all the way to nsWindow::DrawWindowUnderlay. Android robocop tests assume it will, because they rely on DrawWindowOverlay being called so they can take a screenshot and make progress, but this is a very fragile assumption. They also rely on the entire window being painted, which is also a fragile assumption. This patch improves the situation by explicitly invalidating the current window area when Android Java code needs to trigger a composite. This avoids regressions from future patches in this series which make composition bail out when there is nothing invalid. The resulting setup is still a bit fragile for my taste but I'm not sure what the ideal solution would be.
This commit is contained in:
@@ -978,7 +978,7 @@ already_AddRefed<AndroidSurfaceTexture> nsNPAPIPluginInstance::CreateSurfaceText
|
||||
void nsNPAPIPluginInstance::OnSurfaceTextureFrameAvailable()
|
||||
{
|
||||
if (mRunning == RUNNING && mOwner)
|
||||
AndroidBridge::Bridge()->ScheduleComposite();
|
||||
AndroidBridge::Bridge()->InvalidateAndScheduleComposite();
|
||||
}
|
||||
|
||||
void* nsNPAPIPluginInstance::AcquireContentWindow()
|
||||
|
||||
Reference in New Issue
Block a user