mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 951556. Don't do multiple flushes due to DrawBufferWithRotation. r=mattwoodrow
This commit is contained in:
parent
feea036f53
commit
9aca7bac0f
@ -154,8 +154,6 @@ RotatedBuffer::DrawBufferQuadrant(gfx::DrawTarget* aTarget,
|
||||
if (aOperator == OP_SOURCE) {
|
||||
aTarget->PopClip();
|
||||
}
|
||||
|
||||
aTarget->Flush();
|
||||
}
|
||||
|
||||
void
|
||||
@ -391,6 +389,17 @@ ComputeBufferRect(const nsIntRect& aRequestedRect)
|
||||
return rect;
|
||||
}
|
||||
|
||||
void
|
||||
RotatedContentBuffer::FlushBuffers()
|
||||
{
|
||||
if (mDTBuffer) {
|
||||
mDTBuffer->Flush();
|
||||
}
|
||||
if (mDTBufferOnWhite) {
|
||||
mDTBufferOnWhite->Flush();
|
||||
}
|
||||
}
|
||||
|
||||
RotatedContentBuffer::PaintState
|
||||
RotatedContentBuffer::BeginPaint(ThebesLayer* aLayer, ContentType aContentType,
|
||||
uint32_t aFlags)
|
||||
|
@ -75,6 +75,8 @@ public:
|
||||
BUFFER_WHITE, // The buffer with white background, only valid with component alpha.
|
||||
BUFFER_BOTH // The combined black/white buffers, only valid for writing operations, not reading.
|
||||
};
|
||||
// It is the callers repsonsibility to ensure aTarget is flushed after calling
|
||||
// this method.
|
||||
void DrawBufferWithRotation(gfx::DrawTarget* aTarget, ContextSource aSource,
|
||||
float aOpacity = 1.0,
|
||||
gfx::CompositionOp aOperator = gfx::OP_OVER,
|
||||
@ -396,6 +398,10 @@ protected:
|
||||
*/
|
||||
bool EnsureBuffer();
|
||||
bool EnsureBufferOnWhite();
|
||||
|
||||
// Flush our buffers if they are mapped.
|
||||
void FlushBuffers();
|
||||
|
||||
/**
|
||||
* True if we have a buffer where we can get it (but not necessarily
|
||||
* mapped currently).
|
||||
|
@ -598,6 +598,8 @@ ContentClientDoubleBuffered::SyncFrontBufferToBackBuffer()
|
||||
mFrontBufferRect,
|
||||
mFrontBufferRotation);
|
||||
UpdateDestinationFrom(frontBuffer, updateRegion);
|
||||
// We need to flush our buffers before we unlock our front textures
|
||||
FlushBuffers();
|
||||
mFrontClient->Unlock();
|
||||
if (mFrontClientOnWhite) {
|
||||
mFrontClientOnWhite->Unlock();
|
||||
@ -816,6 +818,9 @@ DeprecatedContentClientDoubleBuffered::SyncFrontBufferToBackBuffer()
|
||||
mFrontBufferRotation);
|
||||
UpdateDestinationFrom(frontBuffer, updateRegion);
|
||||
|
||||
// We need to flush our buffers before we unlock our front textures
|
||||
FlushBuffers();
|
||||
|
||||
mFrontAndBackBufferDiffer = false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user