Bug 1289640 - Part 4: Make SourceSurfaceImage::GetTextureClient use the threadsafe upload with D3D11 so that we no longer rely on having a separate device. r=nical
This commit is contained in:
@@ -842,22 +842,14 @@ SourceSurfaceImage::GetTextureClient(CompositableClient *aClient)
|
||||
#endif
|
||||
if (!textureClient) {
|
||||
// gfx::BackendType::NONE means default to content backend
|
||||
textureClient = aClient->CreateTextureClientForDrawing(surface->GetFormat(),
|
||||
surface->GetSize(),
|
||||
BackendSelector::Content,
|
||||
TextureFlags::DEFAULT);
|
||||
textureClient = aClient->CreateTextureClientFromSurface(surface,
|
||||
BackendSelector::Content,
|
||||
TextureFlags::DEFAULT);
|
||||
}
|
||||
if (!textureClient) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
TextureClientAutoLock autoLock(textureClient, OpenMode::OPEN_WRITE_ONLY);
|
||||
if (!autoLock.Succeeded()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
textureClient->UpdateFromSurface(surface);
|
||||
|
||||
textureClient->SyncWithObject(forwarder->GetSyncObject());
|
||||
|
||||
mTextureClients.Put(forwarder->GetSerial(), textureClient);
|
||||
|
||||
Reference in New Issue
Block a user