Bug 902103 - [SkiaGL] Free Layer resource when CanvasContext got demoted. r=snorp, r=gw280

Set mResetLayer as true when CanvasContext got demoted to free the resource owned by CanvasLayer, like GLContext/GLScreenBuffer.
This commit is contained in:
Peter Chang 2013-08-07 22:07:17 +08:00
parent 894f250f52
commit 75aab5b078

View File

@ -755,6 +755,7 @@ void CanvasRenderingContext2D::Demote()
RefPtr<SourceSurface> snapshot = mTarget->Snapshot();
RefPtr<DrawTarget> oldTarget = mTarget;
mTarget = nullptr;
mResetLayer = true;
mForceSoftware = true;
// Recreate target, now demoted to software only