mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1209206 (part 2) - Rename and re-comment HasNonOpaqueColor(). r=jdaggett.
So that the comment and the name match what the code is doing.
This commit is contained in:
parent
7a48e45098
commit
705eeca67d
@ -514,13 +514,13 @@ HasSyntheticBold(gfxTextRun *aRun, uint32_t aStart, uint32_t aLength)
|
||||
return false;
|
||||
}
|
||||
|
||||
// returns true if color is non-opaque (i.e. alpha != 1.0) or completely transparent, false otherwise
|
||||
// if true, color is set on output
|
||||
// Returns true if color is neither opaque nor transparent (i.e. alpha is not 0
|
||||
// or 1), and false otherwise. If true, aCurrentColorOut is set on output.
|
||||
static bool
|
||||
HasNonOpaqueColor(gfxContext *aContext, Color& aCurrentColorOut)
|
||||
HasNonOpaqueNonTransparentColor(gfxContext *aContext, Color& aCurrentColorOut)
|
||||
{
|
||||
if (aContext->GetDeviceColor(aCurrentColorOut)) {
|
||||
if (0.0 < aCurrentColorOut.a && aCurrentColorOut.a < 1.0) {
|
||||
if (0.f < aCurrentColorOut.a && aCurrentColorOut.a < 1.f) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -610,7 +610,7 @@ gfxTextRun::Draw(gfxContext *aContext, gfxPoint aPt, DrawMode aDrawMode,
|
||||
bool needToRestore = false;
|
||||
|
||||
if (aDrawMode == DrawMode::GLYPH_FILL &&
|
||||
HasNonOpaqueColor(aContext, currentColor) &&
|
||||
HasNonOpaqueNonTransparentColor(aContext, currentColor) &&
|
||||
HasSyntheticBold(this, aStart, aLength)) {
|
||||
needToRestore = true;
|
||||
// measure text, use the bounding box
|
||||
|
Loading…
Reference in New Issue
Block a user