mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 761201 - Trigger Skia's RGB565 blitter fast path by using SrcOver instead of Src. r=jrmuizel
This commit is contained in:
parent
7e382355db
commit
9dcb1bb771
@ -630,7 +630,17 @@ DrawTargetSkia::CopySurface(SourceSurface *aSurface,
|
||||
SkIRect source = IntRectToSkIRect(aSourceRect);
|
||||
mCanvas->clipRect(dest, SkRegion::kReplace_Op);
|
||||
SkPaint paint;
|
||||
paint.setXfermodeMode(GfxOpToSkiaOp(OP_SOURCE));
|
||||
|
||||
if (mBitmap.config() == SkBitmap::kRGB_565_Config &&
|
||||
mCanvas->getDevice()->config() == SkBitmap::kRGB_565_Config) {
|
||||
// Set the xfermode to SOURCE_OVER to workaround
|
||||
// http://code.google.com/p/skia/issues/detail?id=628
|
||||
// RGB565 is opaque so they're equivalent anyway
|
||||
paint.setXfermodeMode(SkXfermode::kSrcOver_Mode);
|
||||
} else {
|
||||
paint.setXfermodeMode(SkXfermode::kSrc_Mode);
|
||||
}
|
||||
|
||||
mCanvas->drawBitmapRect(bitmap, &source, dest, &paint);
|
||||
mCanvas->restore();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user