mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1249640: Part 4 Android to use new blocking. r=snorp
This commit is contained in:
parent
ea90851b27
commit
73bd7cde21
@ -414,23 +414,6 @@ gfxAndroidPlatform::RequiresLinearZoom()
|
|||||||
return gfxPlatform::RequiresLinearZoom();
|
return gfxPlatform::RequiresLinearZoom();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
|
||||||
gfxAndroidPlatform::UseAcceleratedSkiaCanvas()
|
|
||||||
{
|
|
||||||
return HaveChoiceOfHWAndSWCanvas() && gfxPlatform::UseAcceleratedSkiaCanvas();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool gfxAndroidPlatform::HaveChoiceOfHWAndSWCanvas()
|
|
||||||
{
|
|
||||||
#ifdef MOZ_WIDGET_ANDROID
|
|
||||||
if (!AndroidBridge::Bridge() || AndroidBridge::Bridge()->GetAPIVersion() < 11) {
|
|
||||||
// It's slower than software due to not having a compositing fast path
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
return gfxPlatform::HaveChoiceOfHWAndSWCanvas();
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef MOZ_WIDGET_GONK
|
#ifdef MOZ_WIDGET_GONK
|
||||||
class GonkVsyncSource final : public VsyncSource
|
class GonkVsyncSource final : public VsyncSource
|
||||||
{
|
{
|
||||||
|
@ -85,8 +85,6 @@ public:
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool HaveChoiceOfHWAndSWCanvas() override;
|
|
||||||
virtual bool UseAcceleratedSkiaCanvas() override;
|
|
||||||
virtual already_AddRefed<mozilla::gfx::VsyncSource> CreateHardwareVsyncSource() override;
|
virtual already_AddRefed<mozilla::gfx::VsyncSource> CreateHardwareVsyncSource() override;
|
||||||
|
|
||||||
#ifdef MOZ_WIDGET_GONK
|
#ifdef MOZ_WIDGET_GONK
|
||||||
|
@ -125,6 +125,8 @@ NS_IMPL_ISUPPORTS_INHERITED(GfxInfo, GfxInfoBase, nsIGfxInfoDebug)
|
|||||||
GfxInfo::GfxInfo()
|
GfxInfo::GfxInfo()
|
||||||
: mInitialized(false)
|
: mInitialized(false)
|
||||||
, mGLStrings(new GLStrings)
|
, mGLStrings(new GLStrings)
|
||||||
|
, mOSVersionInteger(0)
|
||||||
|
, mSDKVersion(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -181,13 +183,14 @@ GfxInfo::EnsureInitialized()
|
|||||||
mAdapterDescription.AppendPrintf(", Manufacturer: %s", NS_LossyConvertUTF16toASCII(mManufacturer).get());
|
mAdapterDescription.AppendPrintf(", Manufacturer: %s", NS_LossyConvertUTF16toASCII(mManufacturer).get());
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t sdkVersion;
|
if (mozilla::AndroidBridge::Bridge()->GetStaticIntField("android/os/Build$VERSION", "SDK_INT", &mSDKVersion)) {
|
||||||
if (!mozilla::AndroidBridge::Bridge()->GetStaticIntField("android/os/Build$VERSION", "SDK_INT", &sdkVersion))
|
// the HARDWARE field isn't available on Android SDK < 8, but we require 9+ anyway.
|
||||||
sdkVersion = 0;
|
MOZ_ASSERT(mSDKVersion >= 8);
|
||||||
|
if (mozilla::AndroidBridge::Bridge()->GetStaticStringField("android/os/Build", "HARDWARE", mHardware)) {
|
||||||
// the HARDWARE field isn't available on Android SDK < 8
|
mAdapterDescription.AppendPrintf(", Hardware: %s", NS_LossyConvertUTF16toASCII(mHardware).get());
|
||||||
if (sdkVersion >= 8 && mozilla::AndroidBridge::Bridge()->GetStaticStringField("android/os/Build", "HARDWARE", mHardware)) {
|
}
|
||||||
mAdapterDescription.AppendPrintf(", Hardware: %s", NS_LossyConvertUTF16toASCII(mHardware).get());
|
} else {
|
||||||
|
mSDKVersion = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsString release;
|
nsString release;
|
||||||
@ -407,6 +410,12 @@ GfxInfo::GetFeatureStatusImpl(int32_t aFeature,
|
|||||||
|
|
||||||
// Don't evaluate special cases when evaluating the downloaded blocklist.
|
// Don't evaluate special cases when evaluating the downloaded blocklist.
|
||||||
if (aDriverInfo.IsEmpty()) {
|
if (aDriverInfo.IsEmpty()) {
|
||||||
|
if (aFeature == nsIGfxInfo::FEATURE_CANVAS2D_ACCELERATION) {
|
||||||
|
// It's slower than software due to not having a compositing fast path
|
||||||
|
*aStatus = (mSDKVersion >= 11) ? nsIGfxInfo::FEATURE_STATUS_OK : nsIGfxInfo::FEATURE_BLOCKED_OS_VERSION;
|
||||||
|
return NS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
if (aFeature == FEATURE_WEBGL_OPENGL) {
|
if (aFeature == FEATURE_WEBGL_OPENGL) {
|
||||||
if (mGLStrings->Renderer().Find("Adreno 200") != -1 ||
|
if (mGLStrings->Renderer().Find("Adreno 200") != -1 ||
|
||||||
mGLStrings->Renderer().Find("Adreno 205") != -1)
|
mGLStrings->Renderer().Find("Adreno 205") != -1)
|
||||||
|
@ -92,6 +92,7 @@ private:
|
|||||||
nsString mModel, mHardware, mManufacturer, mProduct;
|
nsString mModel, mHardware, mManufacturer, mProduct;
|
||||||
nsCString mOSVersion;
|
nsCString mOSVersion;
|
||||||
uint32_t mOSVersionInteger;
|
uint32_t mOSVersionInteger;
|
||||||
|
int32_t mSDKVersion;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace widget
|
} // namespace widget
|
||||||
|
Loading…
Reference in New Issue
Block a user