summaryrefslogtreecommitdiff
path: root/gfx/2d/DrawTargetSkia.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/2d/DrawTargetSkia.cpp')
-rw-r--r--gfx/2d/DrawTargetSkia.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/gfx/2d/DrawTargetSkia.cpp b/gfx/2d/DrawTargetSkia.cpp
index 7e71e54ccf..130623658e 100644
--- a/gfx/2d/DrawTargetSkia.cpp
+++ b/gfx/2d/DrawTargetSkia.cpp
@@ -713,9 +713,11 @@ DrawTargetSkia::DrawSurfaceWithShadow(SourceSurface *aSurface,
mCanvas->drawImage(image, shadowDest.x, shadowDest.y, &shadowPaint);
}
- // Composite the original image after the shadow
- auto dest = IntPoint::Round(aDest);
- mCanvas->drawImage(image, dest.x, dest.y, &paint);
+ if (aSurface->GetFormat() != SurfaceFormat::A8) {
+ // Composite the original image after the shadow
+ auto dest = IntPoint::Round(aDest);
+ mCanvas->drawImage(image, dest.x, dest.y, &paint);
+ }
mCanvas->restore();
}