mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1249312: UseAcceleratedCanvas on Mac should really be UseAcceleratedSkiaCanvas. r=mchang
This commit is contained in:
parent
2368dd9c31
commit
833618d53c
@ -1499,26 +1499,6 @@ LayerManagerComposite::AutoAddMaskEffect::~AutoAddMaskEffect()
|
||||
mCompositable->RemoveMaskEffect();
|
||||
}
|
||||
|
||||
already_AddRefed<DrawTarget>
|
||||
LayerManagerComposite::CreateDrawTarget(const IntSize &aSize,
|
||||
SurfaceFormat aFormat)
|
||||
{
|
||||
#ifdef XP_MACOSX
|
||||
// We don't want to accelerate if the surface is too small which indicates
|
||||
// that it's likely used for an icon/static image. We also don't want to
|
||||
// accelerate anything that is above the maximum texture size of weakest gpu.
|
||||
// Safari uses 5000 area as the minimum for acceleration, we decided 64^2 is more logical.
|
||||
bool useAcceleration = aSize.width <= 4096 && aSize.height <= 4096 &&
|
||||
aSize.width > 64 && aSize.height > 64 &&
|
||||
gfxPlatformMac::GetPlatform()->UseAcceleratedCanvas();
|
||||
if (useAcceleration) {
|
||||
return Factory::CreateDrawTarget(BackendType::COREGRAPHICS_ACCELERATED,
|
||||
aSize, aFormat);
|
||||
}
|
||||
#endif
|
||||
return LayerManager::CreateDrawTarget(aSize, aFormat);
|
||||
}
|
||||
|
||||
LayerComposite::LayerComposite(LayerManagerComposite *aManager)
|
||||
: mCompositeManager(aManager)
|
||||
, mCompositor(aManager->GetCompositor())
|
||||
|
@ -203,14 +203,6 @@ public:
|
||||
bool mFailed;
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates a DrawTarget which is optimized for inter-operating with this
|
||||
* layermanager.
|
||||
*/
|
||||
virtual already_AddRefed<mozilla::gfx::DrawTarget>
|
||||
CreateDrawTarget(const mozilla::gfx::IntSize& aSize,
|
||||
mozilla::gfx::SurfaceFormat aFormat) override;
|
||||
|
||||
/**
|
||||
* Calculates the 'completeness' of the rendering that intersected with the
|
||||
* screen on the last render. This is only useful when progressive tile
|
||||
|
@ -427,10 +427,10 @@ gfxPlatformMac::ReadAntiAliasingThreshold()
|
||||
}
|
||||
|
||||
bool
|
||||
gfxPlatformMac::UseAcceleratedCanvas()
|
||||
gfxPlatformMac::UseAcceleratedSkiaCanvas()
|
||||
{
|
||||
// Lion or later is required
|
||||
return nsCocoaFeatures::OnLionOrLater() && Preferences::GetBool("gfx.canvas.azure.accelerated", false);
|
||||
return nsCocoaFeatures::OnLionOrLater() && gfxPlatform::UseAcceleratedSkiaCanvas();
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -90,7 +90,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
bool UseAcceleratedCanvas();
|
||||
virtual bool UseAcceleratedSkiaCanvas() override;
|
||||
|
||||
virtual bool UseProgressivePaint() override;
|
||||
virtual already_AddRefed<mozilla::gfx::VsyncSource> CreateHardwareVsyncSource() override;
|
||||
|
Loading…
Reference in New Issue
Block a user