Bug 1046344 - Add a build option to enable the C++ APZ code. r=snorp

This commit is contained in:
Kartikaya Gupta 2014-08-08 17:41:51 -04:00
parent 25650e8cfe
commit 00034d810d
4 changed files with 29 additions and 1 deletions

View File

@ -3817,6 +3817,7 @@ MOZ_SAFE_BROWSING=
MOZ_HELP_VIEWER=
MOZ_SPELLCHECK=1
MOZ_ANDROID_OMTC=
MOZ_ANDROID_APZ=
MOZ_TOOLKIT_SEARCH=1
MOZ_UI_LOCALE=en-US
MOZ_UNIVERSALCHARDET=1
@ -4819,6 +4820,18 @@ if test -n "$MOZ_ANDROID_OMTC"; then
AC_DEFINE(MOZ_ANDROID_OMTC)
fi
dnl ========================================================
dnl = Enable the C++ async pan/zoom code instead of the Java version
dnl ========================================================
MOZ_ARG_ENABLE_BOOL(android-apz,
[ --enable-android-apz Switch to C++ pan/zoom code],
MOZ_ANDROID_APZ=1,
MOZ_ANDROID_APZ=)
if test -n "$MOZ_ANDROID_APZ"; then
dnl Do this if defined in confvars.sh
AC_DEFINE(MOZ_ANDROID_APZ)
fi
dnl ========================================================
dnl = Disable WebSMS backend
dnl ========================================================
@ -8397,6 +8410,7 @@ AC_SUBST(MOZ_UNIVERSALCHARDET)
AC_SUBST(ACCESSIBILITY)
AC_SUBST(MOZ_SPELLCHECK)
AC_SUBST(MOZ_ANDROID_OMTC)
AC_SUBST(MOZ_ANDROID_APZ)
AC_SUBST(MOZ_ANDROID_ANR_REPORTER)
AC_SUBST(MOZ_CRASHREPORTER)
AC_SUBST(MOZ_CRASHREPORTER_INJECTOR)

View File

@ -564,6 +564,9 @@ pref("ui.dragThresholdY", 25);
pref("layers.acceleration.disabled", false);
pref("layers.offmainthreadcomposition.enabled", true);
pref("layers.async-video.enabled", true);
#ifdef MOZ_ANDROID_APZ
pref("layers.async-pan-zoom.enabled", true);
#endif
pref("layers.progressive-paint", true);
pref("layers.low-precision-buffer", true);
pref("layers.low-precision-resolution", "0.25");

View File

@ -196,6 +196,13 @@ public class AppConstants {
false;
#endif
public static final boolean MOZ_ANDROID_APZ =
#ifdef MOZ_ANDROID_APZ
true;
#else
false;
#endif
// See this wiki page for more details about channel specific build defines:
// https://wiki.mozilla.org/Platform/Channel-specific_build_defines
public static final boolean RELEASE_BUILD =

View File

@ -23,7 +23,11 @@ public interface PanZoomController {
static class Factory {
static PanZoomController create(PanZoomTarget target, View view, EventDispatcher dispatcher) {
return new JavaPanZoomController(target, view, dispatcher);
if (org.mozilla.gecko.AppConstants.MOZ_ANDROID_APZ) {
return new NativePanZoomController(target, view, dispatcher);
} else {
return new JavaPanZoomController(target, view, dispatcher);
}
}
}