mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 01:48:05 +00:00
Bug 711063 - Part 7: Adjust Border rendering code for Azure-Thebes wrapper. r=roc
This commit is contained in:
parent
1897e8ad30
commit
eac3fe19e3
@ -1088,15 +1088,16 @@ nsCSSBorderRenderer::CreateCornerGradient(mozilla::css::Corner aCorner,
|
||||
|
||||
float gradientOffset;
|
||||
|
||||
if (mContext->OriginalSurface()->GetType() == gfxASurface::SurfaceTypeD2D ||
|
||||
mContext->OriginalSurface()->GetType() == gfxASurface::SurfaceTypeQuartz)
|
||||
if (mContext->IsCairo() &&
|
||||
(mContext->OriginalSurface()->GetType() == gfxASurface::SurfaceTypeD2D ||
|
||||
mContext->OriginalSurface()->GetType() == gfxASurface::SurfaceTypeQuartz))
|
||||
{
|
||||
// On quarz this doesn't do exactly the right thing, but it does do what
|
||||
// most other browsers do and doing the 'right' thing seems to be
|
||||
// hard with the quartz cairo backend.
|
||||
gradientOffset = 0;
|
||||
} else {
|
||||
// When cairo does the gradient drawing this gives us pretty nice behavior!
|
||||
// When cairo/Azure does the gradient drawing this gives us pretty nice behavior!
|
||||
gradientOffset = 0.25 / sqrt(pow(mBorderWidths[cornerHeight[aCorner]], 2) +
|
||||
pow(mBorderWidths[cornerHeight[aCorner]], 2));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user