mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 15:25:52 +00:00
Bug 1284721 - Flush CanvasRenderingContext2D's DrawTarget when returning it to the BufferProvider. r=lsalzman
This commit is contained in:
parent
37464db2f3
commit
144561ee0b
@ -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();
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user