Bug 1059033 - Part 4: Avoid recreating DrawTargets too often. r=nical

--HG--
extra : rebase_source : b25fcc2b2fb298b9654c36a57fc9fa26877bf9ff
This commit is contained in:
Matt Woodrow 2014-09-02 12:35:10 +12:00
parent dbfc91a41f
commit 0da1f6255a

View File

@ -689,6 +689,7 @@ BufferTextureClient::BorrowDrawTarget()
MOZ_ASSERT(mLocked, "BorrowDrawTarget should be called on locked textures only");
if (mDrawTarget) {
mDrawTarget->SetTransform(Matrix());
return mDrawTarget;
}
@ -738,7 +739,6 @@ BufferTextureClient::Unlock()
}
mDrawTarget->Flush();
mDrawTarget = nullptr;
}
bool