Bug 1692894 p1: Don't create devices for canvas when remote canvas is in use. r=jrmuizel
This also adds related DLLs to be delay loaded to xul's moz.build. This means that if we don't create the devices they are not loaded at all. Differential Revision: https://phabricator.services.mozilla.com/D105630
This commit is contained in:
@@ -742,9 +742,11 @@ void WebRenderLayerManager::SetRoot(Layer* aLayer) {
|
||||
already_AddRefed<PersistentBufferProvider>
|
||||
WebRenderLayerManager::CreatePersistentBufferProvider(
|
||||
const gfx::IntSize& aSize, gfx::SurfaceFormat aFormat) {
|
||||
// Ensure devices initialization for canvas 2d. The devices are lazily
|
||||
// initialized with WebRender to reduce memory usage.
|
||||
gfxPlatform::GetPlatform()->EnsureDevicesInitialized();
|
||||
// Ensure devices initialization for canvas 2d if not remote. The devices are
|
||||
// lazily initialized with WebRender to reduce memory usage.
|
||||
if (!gfxPlatform::UseRemoteCanvas()) {
|
||||
gfxPlatform::GetPlatform()->EnsureDevicesInitialized();
|
||||
}
|
||||
|
||||
RefPtr<PersistentBufferProvider> provider =
|
||||
PersistentBufferProviderShared::Create(aSize, aFormat,
|
||||
|
||||
Reference in New Issue
Block a user