mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 991513 - Part 1: Don't lock ContentClientDoubleBuffered's texture until we need the buffers. r=nrc
This commit is contained in:
parent
a738282fd1
commit
6f304e526d
@ -499,14 +499,14 @@ RotatedContentBuffer::BeginPaint(ThebesLayer* aLayer,
|
||||
|
||||
result.mRegionToDraw.Sub(neededRegion, validRegion);
|
||||
|
||||
if (result.mRegionToDraw.IsEmpty())
|
||||
return result;
|
||||
|
||||
// Do not modify result.mRegionToDraw or result.mContentType after this call.
|
||||
// Do not modify mBufferRect, mBufferRotation, or mDidSelfCopy,
|
||||
// or call CreateBuffer before this call.
|
||||
FinalizeFrame(result.mRegionToDraw);
|
||||
|
||||
if (result.mRegionToDraw.IsEmpty())
|
||||
return result;
|
||||
|
||||
nsIntRect drawBounds = result.mRegionToDraw.GetBounds();
|
||||
RefPtr<DrawTarget> destDTBuffer;
|
||||
RefPtr<DrawTarget> destDTBufferOnWhite;
|
||||
|
@ -156,10 +156,10 @@ ContentClientRemoteBuffer::EndPaint()
|
||||
}
|
||||
mOldTextures.Clear();
|
||||
|
||||
if (mTextureClient) {
|
||||
if (mTextureClient && mTextureClient->IsLocked()) {
|
||||
mTextureClient->Unlock();
|
||||
}
|
||||
if (mTextureClientOnWhite) {
|
||||
if (mTextureClientOnWhite && mTextureClientOnWhite->IsLocked()) {
|
||||
mTextureClientOnWhite->Unlock();
|
||||
}
|
||||
}
|
||||
@ -382,15 +382,6 @@ ContentClientDoubleBuffered::PrepareFrame()
|
||||
{
|
||||
mIsNewBuffer = false;
|
||||
|
||||
if (mTextureClient) {
|
||||
DebugOnly<bool> locked = mTextureClient->Lock(OPEN_READ_WRITE);
|
||||
MOZ_ASSERT(locked);
|
||||
}
|
||||
if (mTextureClientOnWhite) {
|
||||
DebugOnly<bool> locked = mTextureClientOnWhite->Lock(OPEN_READ_WRITE);
|
||||
MOZ_ASSERT(locked);
|
||||
}
|
||||
|
||||
if (!mFrontAndBackBufferDiffer) {
|
||||
return;
|
||||
}
|
||||
@ -415,6 +406,15 @@ ContentClientDoubleBuffered::PrepareFrame()
|
||||
void
|
||||
ContentClientDoubleBuffered::FinalizeFrame(const nsIntRegion& aRegionToDraw)
|
||||
{
|
||||
if (mTextureClient) {
|
||||
DebugOnly<bool> locked = mTextureClient->Lock(OPEN_READ_WRITE);
|
||||
MOZ_ASSERT(locked);
|
||||
}
|
||||
if (mTextureClientOnWhite) {
|
||||
DebugOnly<bool> locked = mTextureClientOnWhite->Lock(OPEN_READ_WRITE);
|
||||
MOZ_ASSERT(locked);
|
||||
}
|
||||
|
||||
if (!mFrontAndBackBufferDiffer) {
|
||||
MOZ_ASSERT(!mDidSelfCopy, "If we have to copy the world, then our buffers are different, right?");
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user