mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-03 18:47:53 +00:00
Bug 1273227 - Fix an assertion in TextureClient::Unlock(). r=nical
MozReview-Commit-ID: JwWPe4F0NCq --HG-- extra : rebase_source : 82262bd0a1ca7a0aa32e7007578b5b00e8139f0f
This commit is contained in:
parent
5945a3f065
commit
ee8e0b9c30
@ -1043,13 +1043,17 @@ TextureClient::SetRemoveFromCompositableWaiter(AsyncTransactionWaiter* aWaiter)
|
||||
already_AddRefed<gfx::DataSourceSurface>
|
||||
TextureClient::GetAsSurface()
|
||||
{
|
||||
Lock(OpenMode::OPEN_READ);
|
||||
if (!Lock(OpenMode::OPEN_READ)) {
|
||||
return nullptr;
|
||||
}
|
||||
RefPtr<gfx::DataSourceSurface> data;
|
||||
RefPtr<gfx::DrawTarget> dt = BorrowDrawTarget();
|
||||
if (dt) {
|
||||
RefPtr<gfx::SourceSurface> surf = dt->Snapshot();
|
||||
if (surf) {
|
||||
data = surf->GetDataSurface();
|
||||
{ // scope so that the DrawTarget is destroyed before Unlock()
|
||||
RefPtr<gfx::DrawTarget> dt = BorrowDrawTarget();
|
||||
if (dt) {
|
||||
RefPtr<gfx::SourceSurface> surf = dt->Snapshot();
|
||||
if (surf) {
|
||||
data = surf->GetDataSurface();
|
||||
}
|
||||
}
|
||||
}
|
||||
Unlock();
|
||||
|
Loading…
Reference in New Issue
Block a user