Bug 1284721 - Flush CanvasRenderingContext2D's DrawTarget when returning it to the BufferProvider. r=lsalzman

This commit is contained in:
Nicolas Silva 2016-07-11 17:44:27 +02:00
parent 37464db2f3
commit 144561ee0b
2 changed files with 5 additions and 3 deletions

View File

@ -904,9 +904,6 @@ public:
if (!context || !context->mTarget)
return;
// Since SkiaGL default to store drawing command until flush
// We will have to flush it before present.
context->mTarget->Flush();
context->ReturnTarget();
}

View File

@ -40,6 +40,11 @@ PersistentBufferProviderBasic::ReturnDrawTarget(already_AddRefed<gfx::DrawTarget
{
RefPtr<gfx::DrawTarget> dt(aDT);
MOZ_ASSERT(mDrawTarget == dt);
if (dt) {
// Since SkiaGL default to storing drawing command until flush
// we have to flush it before present.
dt->Flush();
}
return true;
}