зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1188752: Ensure persistence of DrawTarget when using InitializeWithSurface. r=jrmuizel
This commit is contained in:
Родитель
3e8b0857ab
Коммит
7214209e15
|
@ -5446,12 +5446,7 @@ CanvasRenderingContext2D::GetBufferProvider(LayerManager* aManager)
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
mBufferProvider = aManager->CreatePersistentBufferProvider(mTarget->GetSize(), mTarget->GetFormat());
|
||||
|
||||
RefPtr<SourceSurface> surf = mTarget->Snapshot();
|
||||
|
||||
mTarget = mBufferProvider->GetDT(IntRect(IntPoint(), mTarget->GetSize()));
|
||||
mTarget->CopySurface(surf, IntRect(IntPoint(), mTarget->GetSize()), IntPoint());
|
||||
mBufferProvider = new PersistentBufferProviderBasic(mTarget);
|
||||
|
||||
return mBufferProvider;
|
||||
}
|
||||
|
|
|
@ -59,6 +59,7 @@ public:
|
|||
|
||||
PersistentBufferProviderBasic(LayerManager* aManager, gfx::IntSize aSize,
|
||||
gfx::SurfaceFormat aFormat, gfx::BackendType aBackend);
|
||||
PersistentBufferProviderBasic(gfx::DrawTarget* aTarget) : mDrawTarget(aTarget) {}
|
||||
|
||||
bool IsValid() { return !!mDrawTarget; }
|
||||
virtual LayersBackend GetType() { return LayersBackend::LAYERS_BASIC; }
|
||||
|
|
Загрузка…
Ссылка в новой задаче