mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1004375 - Removed use of legacy skia compatible device API - r=gw280
This commit is contained in:
parent
046a7f6d8c
commit
f3a8550e6e
@ -721,9 +721,18 @@ DrawTargetSkia::CopySurface(SourceSurface *aSurface,
|
||||
bool
|
||||
DrawTargetSkia::Init(const IntSize &aSize, SurfaceFormat aFormat)
|
||||
{
|
||||
SkAutoTUnref<SkBaseDevice> device(new SkBitmapDevice(GfxFormatToSkiaConfig(aFormat),
|
||||
aSize.width, aSize.height,
|
||||
aFormat == SurfaceFormat::B8G8R8X8));
|
||||
SkAlphaType alphaType = (aFormat == SurfaceFormat::B8G8R8X8) ?
|
||||
kOpaque_SkAlphaType : kPremul_SkAlphaType;
|
||||
|
||||
SkImageInfo skiInfo = SkImageInfo::Make(
|
||||
aSize.width, aSize.height,
|
||||
GfxFormatToSkiaColorType(aFormat),
|
||||
alphaType);
|
||||
|
||||
SkAutoTUnref<SkBaseDevice> device(SkBitmapDevice::Create(skiInfo));
|
||||
if (!device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
SkBitmap bitmap = device->accessBitmap(true);
|
||||
if (!bitmap.allocPixels()) {
|
||||
|
@ -204,4 +204,3 @@
|
||||
#endif
|
||||
|
||||
#define SK_ALLOW_STATIC_GLOBAL_INITIALIZERS 0
|
||||
#define SK_SUPPORT_LEGACY_COMPATIBLEDEVICE_CONFIG 1
|
||||
|
Loading…
Reference in New Issue
Block a user