mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-15 06:15:43 +00:00
Backed out changeset a2f85a996314 (bug 907926) for TART regressions
This commit is contained in:
parent
ea6835bffd
commit
b6d0b0a524
@ -161,7 +161,6 @@ RotatedBuffer::DrawBufferQuadrant(gfx::DrawTarget* aTarget,
|
||||
XSide aXSide, YSide aYSide,
|
||||
ContextSource aSource,
|
||||
float aOpacity,
|
||||
gfx::CompositionOp aOperator,
|
||||
gfx::SourceSurface* aMask,
|
||||
const gfx::Matrix* aMaskTransform) const
|
||||
{
|
||||
@ -194,26 +193,14 @@ RotatedBuffer::DrawBufferQuadrant(gfx::DrawTarget* aTarget,
|
||||
SurfacePattern source(snapshot, EXTEND_CLAMP, transform);
|
||||
#endif
|
||||
|
||||
if (aOperator == OP_SOURCE) {
|
||||
// OP_SOURCE is unbounded in Azure, and we really don't want that behaviour here.
|
||||
// We also can't do a ClearRect+FillRect since we need the drawing to happen
|
||||
// as an atomic operation (to prevent flickering).
|
||||
aTarget->PushClipRect(gfx::Rect(fillRect.x, fillRect.y,
|
||||
fillRect.width, fillRect.height));
|
||||
}
|
||||
|
||||
if (aMask) {
|
||||
SurfacePattern mask(aMask, EXTEND_CLAMP, *aMaskTransform);
|
||||
|
||||
aTarget->Mask(source, mask, DrawOptions(aOpacity, aOperator));
|
||||
aTarget->Mask(source, mask, DrawOptions(aOpacity));
|
||||
} else {
|
||||
aTarget->FillRect(gfx::Rect(fillRect.x, fillRect.y,
|
||||
fillRect.width, fillRect.height),
|
||||
source, DrawOptions(aOpacity, aOperator));
|
||||
}
|
||||
|
||||
if (aOperator == OP_SOURCE) {
|
||||
aTarget->PopClip();
|
||||
source, DrawOptions(aOpacity));
|
||||
}
|
||||
|
||||
aTarget->Flush();
|
||||
@ -237,7 +224,6 @@ RotatedBuffer::DrawBufferWithRotation(gfxContext* aTarget, ContextSource aSource
|
||||
void
|
||||
RotatedBuffer::DrawBufferWithRotation(gfx::DrawTarget *aTarget, ContextSource aSource,
|
||||
float aOpacity,
|
||||
gfx::CompositionOp aOperator,
|
||||
gfx::SourceSurface* aMask,
|
||||
const gfx::Matrix* aMaskTransform) const
|
||||
{
|
||||
@ -245,10 +231,10 @@ RotatedBuffer::DrawBufferWithRotation(gfx::DrawTarget *aTarget, ContextSource aS
|
||||
// See above, in Azure Repeat should always be a safe, even faster choice
|
||||
// though! Particularly on D2D Repeat should be a lot faster, need to look
|
||||
// into that. TODO[Bas]
|
||||
DrawBufferQuadrant(aTarget, LEFT, TOP, aSource, aOpacity, aOperator, aMask, aMaskTransform);
|
||||
DrawBufferQuadrant(aTarget, RIGHT, TOP, aSource, aOpacity, aOperator, aMask, aMaskTransform);
|
||||
DrawBufferQuadrant(aTarget, LEFT, BOTTOM, aSource, aOpacity, aOperator, aMask, aMaskTransform);
|
||||
DrawBufferQuadrant(aTarget, RIGHT, BOTTOM, aSource, aOpacity, aOperator,aMask, aMaskTransform);
|
||||
DrawBufferQuadrant(aTarget, LEFT, TOP, aSource, aOpacity, aMask, aMaskTransform);
|
||||
DrawBufferQuadrant(aTarget, RIGHT, TOP, aSource, aOpacity, aMask, aMaskTransform);
|
||||
DrawBufferQuadrant(aTarget, LEFT, BOTTOM, aSource, aOpacity, aMask, aMaskTransform);
|
||||
DrawBufferQuadrant(aTarget, RIGHT, BOTTOM, aSource, aOpacity, aMask, aMaskTransform);
|
||||
}
|
||||
|
||||
/* static */ bool
|
||||
@ -320,8 +306,7 @@ ThebesLayerBuffer::DrawTo(ThebesLayer* aLayer,
|
||||
maskTransform = ToMatrix(*aMaskTransform);
|
||||
}
|
||||
|
||||
CompositionOp op = CompositionOpForOp(aTarget->CurrentOperator());
|
||||
DrawBufferWithRotation(dt, BUFFER_BLACK, aOpacity, op, mask, &maskTransform);
|
||||
DrawBufferWithRotation(dt, BUFFER_BLACK, aOpacity, mask, &maskTransform);
|
||||
if (clipped) {
|
||||
dt->PopClip();
|
||||
}
|
||||
@ -742,7 +727,7 @@ ThebesLayerBuffer::BeginPaint(ThebesLayer* aLayer, ContentType aContentType,
|
||||
destDTBuffer->SetTransform(mat);
|
||||
EnsureBuffer();
|
||||
MOZ_ASSERT(mDTBuffer, "Have we got a Thebes buffer for some reason?");
|
||||
DrawBufferWithRotation(destDTBuffer, BUFFER_BLACK, 1.0, OP_SOURCE);
|
||||
DrawBufferWithRotation(destDTBuffer, BUFFER_BLACK);
|
||||
destDTBuffer->SetTransform(Matrix());
|
||||
|
||||
if (mode == Layer::SURFACE_COMPONENT_ALPHA) {
|
||||
@ -750,7 +735,7 @@ ThebesLayerBuffer::BeginPaint(ThebesLayer* aLayer, ContentType aContentType,
|
||||
destDTBufferOnWhite->SetTransform(mat);
|
||||
EnsureBufferOnWhite();
|
||||
MOZ_ASSERT(destDTBufferOnWhite, "Have we got a Thebes buffer for some reason?");
|
||||
DrawBufferWithRotation(destDTBufferOnWhite, BUFFER_WHITE, 1.0, OP_SOURCE);
|
||||
DrawBufferWithRotation(destDTBufferOnWhite, BUFFER_WHITE);
|
||||
destDTBufferOnWhite->SetTransform(Matrix());
|
||||
}
|
||||
}
|
||||
|
@ -87,7 +87,6 @@ public:
|
||||
|
||||
void DrawBufferWithRotation(gfx::DrawTarget* aTarget, ContextSource aSource,
|
||||
float aOpacity = 1.0,
|
||||
gfx::CompositionOp aOperator = gfx::OP_OVER,
|
||||
gfx::SourceSurface* aMask = nullptr,
|
||||
const gfx::Matrix* aMaskTransform = nullptr) const;
|
||||
|
||||
@ -125,7 +124,6 @@ protected:
|
||||
void DrawBufferQuadrant(gfx::DrawTarget* aTarget, XSide aXSide, YSide aYSide,
|
||||
ContextSource aSource,
|
||||
float aOpacity,
|
||||
gfx::CompositionOp aOperator,
|
||||
gfx::SourceSurface* aMask,
|
||||
const gfx::Matrix* aMaskTransform) const;
|
||||
|
||||
|
@ -537,7 +537,11 @@ ContentClientDoubleBuffered::UpdateDestinationFrom(const RotatedBuffer& aSource,
|
||||
|
||||
if (SupportsAzureContent()) {
|
||||
MOZ_ASSERT(!destCtx->IsCairo());
|
||||
aSource.DrawBufferWithRotation(destCtx->GetDrawTarget(), BUFFER_BLACK, 1.0, OP_SOURCE);
|
||||
|
||||
if (destCtx->GetDrawTarget()->GetFormat() == FORMAT_B8G8R8A8) {
|
||||
destCtx->GetDrawTarget()->ClearRect(Rect(0, 0, mFrontBufferRect.width, mFrontBufferRect.height));
|
||||
}
|
||||
aSource.DrawBufferWithRotation(destCtx->GetDrawTarget(), BUFFER_BLACK);
|
||||
} else {
|
||||
aSource.DrawBufferWithRotation(destCtx, BUFFER_BLACK);
|
||||
}
|
||||
@ -555,7 +559,11 @@ ContentClientDoubleBuffered::UpdateDestinationFrom(const RotatedBuffer& aSource,
|
||||
|
||||
if (SupportsAzureContent()) {
|
||||
MOZ_ASSERT(!destCtx->IsCairo());
|
||||
aSource.DrawBufferWithRotation(destCtx->GetDrawTarget(), BUFFER_WHITE, 1.0, OP_SOURCE);
|
||||
|
||||
if (destCtx->GetDrawTarget()->GetFormat() == FORMAT_B8G8R8A8) {
|
||||
destCtx->GetDrawTarget()->ClearRect(Rect(0, 0, mFrontBufferRect.width, mFrontBufferRect.height));
|
||||
}
|
||||
aSource.DrawBufferWithRotation(destCtx->GetDrawTarget(), BUFFER_WHITE);
|
||||
} else {
|
||||
aSource.DrawBufferWithRotation(destCtx, BUFFER_WHITE);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user