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:
Matt Woodrow
2016-08-02 17:57:41 +12:00
parent 643562756a
commit 1caa78f991
6 changed files with 98 additions and 39 deletions

View File

@@ -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);