app_server: Remove special case for fully opaque layers

* Fixes #19871.

Change-Id: I4b74dc9fae512530ed1d0bec74d73c24c6a99ea3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10212
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
Kacper Kasper
2026-01-09 19:08:35 +00:00
parent 256ab7351b
commit 7c9ee88078
+6 -9
View File
@@ -238,11 +238,6 @@ Canvas::BlendLayer(Layer* layerPtr)
{
BReference<Layer> layer(layerPtr, true);
if (layer->Opacity() == 255) {
layer->Play(this);
return;
}
BReference <UtilityBitmap> layerBitmap(layer->RenderToBitmap(this), true);
if (layerBitmap == NULL)
return;
@@ -257,11 +252,13 @@ Canvas::BlendLayer(Layer* layerPtr)
fDrawState->SetBlendingMode(B_PIXEL_ALPHA, B_ALPHA_COMPOSITE);
fDrawState->SetTransformEnabled(false);
BReference<AlphaMask> mask(new(std::nothrow) UniformAlphaMask(layer->Opacity()), true);
if (mask == NULL)
return;
if (layer->Opacity() < 255) {
BReference<AlphaMask> mask(new(std::nothrow) UniformAlphaMask(layer->Opacity()), true);
if (mask == NULL)
return;
SetAlphaMask(mask);
SetAlphaMask(mask);
}
ResyncDrawState();
GetDrawingEngine()->DrawBitmap(layerBitmap, layerBitmap->Bounds(),