Bug 1291375 - 1. Compile separate gecko-view.jar; r=nalexander
authorJim Chen <nchen@mozilla.com>
Fri, 16 Sep 2016 15:13:47 -0400
changeset 314308 797a4dbc48d82b47e03a818bbc14a12e75daddda
parent 314307 b65ad36d73113726aad93f42477c9efaa7af3723
child 314309 3d98d13567fcab822f2da7fd71a9148290a1d641
push id30718
push userphilringnalda@gmail.com
push dateSat, 17 Sep 2016 20:44:56 +0000
treeherdermozilla-central@eaf5eb6f8fa0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnalexander
bugs1291375
milestone51.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1291375 - 1. Compile separate gecko-view.jar; r=nalexander Compile geckoview sources into a separate gecko-view.jar file, apart from gecko-browser.jar. This lets us separate JNI binding generation, among other things.
mobile/android/base/Makefile.in
mobile/android/base/moz.build
mobile/android/geckoview/src/main/java/org/mozilla/gecko/gfx/LayerView.java
mobile/android/tests/background/junit3/moz.build
mobile/android/tests/browser/junit3/moz.build
--- a/mobile/android/base/Makefile.in
+++ b/mobile/android/base/Makefile.in
@@ -146,16 +146,17 @@ java_bundled_libs := $(subst $(NULL) ,:,
 # java_bundled_libs, which holds the jars which we're including as binaries).
 ALL_JARS = \
   constants.jar \
   gecko-R.jar \
   gecko-browser.jar \
   gecko-mozglue.jar \
   gecko-thirdparty.jar \
   gecko-util.jar \
+  gecko-view.jar \
   services.jar \
   sync-thirdparty.jar \
   ../javaaddons/javaaddons-1.0.jar \
   $(NULL)
 
 ifdef MOZ_WEBRTC
 ALL_JARS += webrtc.jar
 endif
--- a/mobile/android/base/moz.build
+++ b/mobile/android/base/moz.build
@@ -193,22 +193,26 @@ if CONFIG['MOZ_WEBRTC']:
         audio_root + 'WebRtcAudioRecord.java',
         audio_root + 'WebRtcAudioTrack.java',
         audio_root + 'WebRtcAudioUtils.java',
     ]
     wrjar.extra_jars = [
         'constants.jar',
         'gecko-R.jar',
         'gecko-browser.jar',
+        'gecko-mozglue.jar',
         'gecko-util.jar',
-        'gecko-mozglue.jar',
+        'gecko-view.jar',
     ]
     wrjar.javac_flags += ['-Xlint:all,-deprecation,-cast']
 
-geckoview_java_files = [
+gvjar = add_java_jar('gecko-view')
+
+gvjar.sources += [geckoview_source_dir + 'java/org/mozilla/gecko/' + x
+                  for x in [
     'AlarmReceiver.java',
     'AndroidGamepadManager.java',
     'ANRReporter.java',
     'BaseGeckoInterface.java',
     'ContextGetter.java',
     'CrashHandler.java',
     'EventDispatcher.java',
     'GeckoAccessibility.java',
@@ -278,21 +282,42 @@ geckoview_java_files = [
     'PrefsHelper.java',
     'SmsManager.java',
     'sqlite/ByteBufferInputStream.java',
     'sqlite/MatrixBlobCursor.java',
     'sqlite/SQLiteBridge.java',
     'sqlite/SQLiteBridgeException.java',
     'TouchEventInterceptor.java',
     'widget/SwipeDismissListViewTouchListener.java',
+]]
+
+gvjar.sources += [thirdparty_source_dir + f for f in [
+    'com/googlecode/eyesfree/braille/selfbraille/ISelfBrailleService.java',
+    'com/googlecode/eyesfree/braille/selfbraille/SelfBrailleClient.java',
+    'com/googlecode/eyesfree/braille/selfbraille/WriteData.java',
+]]
+
+gvjar.extra_jars += [
+    CONFIG['ANDROID_SUPPORT_ANNOTATIONS_JAR_LIB'],
+    CONFIG['ANDROID_SUPPORT_V4_AAR_LIB'],
+    CONFIG['ANDROID_SUPPORT_V4_AAR_INTERNAL_LIB'],
+    'constants.jar',
+    'gecko-R.jar',
+    'gecko-mozglue.jar',
+    'gecko-util.jar',
 ]
 
+gvjar.javac_flags += [
+    '-Xlint:all,-deprecation,-fallthrough',
+    '-J-Xmx512m',
+    '-J-Xms128m'
+]
+
+
 gbjar = add_java_jar('gecko-browser')
-gbjar.sources += [geckoview_source_dir + 'java/org/mozilla/gecko/' + x
-                  for x in geckoview_java_files]
 
 gbjar.sources += ['java/org/mozilla/gecko/' + x for x in [
     'AboutPages.java',
     'AccountsHelper.java',
     'ActionBarTextSelection.java',
     'ActionModeCompat.java',
     'ActionModeCompatView.java',
     'ActivityHandlerHelper.java',
@@ -737,21 +762,16 @@ gbjar.sources += ['java/org/mozilla/geck
     'widget/themed/ThemedImageButton.java',
     'widget/themed/ThemedImageView.java',
     'widget/themed/ThemedLinearLayout.java',
     'widget/themed/ThemedRelativeLayout.java',
     'widget/themed/ThemedTextSwitcher.java',
     'widget/themed/ThemedTextView.java',
     'widget/themed/ThemedView.java',
 ]]
-gbjar.sources += [ thirdparty_source_dir + f for f in [
-    'com/googlecode/eyesfree/braille/selfbraille/ISelfBrailleService.java',
-    'com/googlecode/eyesfree/braille/selfbraille/SelfBrailleClient.java',
-    'com/googlecode/eyesfree/braille/selfbraille/WriteData.java',
-] ]
 android_package_dir = CONFIG['ANDROID_PACKAGE_NAME'].replace('.', '/')
 gbjar.generated_sources = [] # Keep it this way.
 gbjar.extra_jars += [
     CONFIG['ANDROID_SUPPORT_ANNOTATIONS_JAR_LIB'],
     CONFIG['ANDROID_SUPPORT_V4_AAR_LIB'],
     CONFIG['ANDROID_SUPPORT_V4_AAR_INTERNAL_LIB'],
     'constants.jar'
 ]
@@ -789,16 +809,17 @@ if max_sdk_version >= 11:
     ]]
 
 gbjar.extra_jars += [
     OBJDIR + '/../javaaddons/javaaddons-1.0.jar',
     'gecko-R.jar',
     'gecko-mozglue.jar',
     'gecko-thirdparty.jar',
     'gecko-util.jar',
+    'gecko-view.jar',
     'sync-thirdparty.jar',
     'services.jar',
 ]
 
 moz_native_devices_jars = [
     CONFIG['ANDROID_MEDIAROUTER_V7_AAR_LIB'],
     CONFIG['ANDROID_MEDIAROUTER_V7_AAR_INTERNAL_LIB'],
     CONFIG['ANDROID_PLAY_SERVICES_BASE_AAR_LIB'],
@@ -1064,17 +1085,18 @@ if CONFIG['MOZ_ANDROID_SEARCH_ACTIVITY']
         CONFIG['ANDROID_SUPPORT_ANNOTATIONS_JAR_LIB'],
         CONFIG['ANDROID_SUPPORT_V4_AAR_LIB'],
         CONFIG['ANDROID_SUPPORT_V4_AAR_INTERNAL_LIB'],
         'constants.jar',
         'gecko-R.jar',
         'gecko-browser.jar',
         'gecko-mozglue.jar',
         'gecko-thirdparty.jar',
-        'gecko-util.jar'
+        'gecko-util.jar',
+        'gecko-view.jar',
     ]
 
 FINAL_TARGET_PP_FILES += ['package-name.txt.in']
 
 DEFINES['OBJDIR'] = OBJDIR
 DEFINES['TOPOBJDIR'] = TOPOBJDIR
 
 OBJDIR_PP_FILES.mobile.android.base += [
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/gfx/LayerView.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/gfx/LayerView.java
@@ -4,17 +4,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 package org.mozilla.gecko.gfx;
 
 import java.nio.ByteBuffer;
 import java.nio.IntBuffer;
 
 import org.mozilla.gecko.AndroidGamepadManager;
-import org.mozilla.gecko.animation.ViewHelper;
 import org.mozilla.gecko.annotation.RobocopTarget;
 import org.mozilla.gecko.annotation.WrapForJNI;
 import org.mozilla.gecko.AppConstants;
 import org.mozilla.gecko.AppConstants.Versions;
 import org.mozilla.gecko.EventDispatcher;
 import org.mozilla.gecko.GeckoAccessibility;
 import org.mozilla.gecko.GeckoAppShell;
 import org.mozilla.gecko.GeckoThread;
@@ -681,21 +680,21 @@ public class LayerView extends FrameLayo
         return mFullScreenState;
     }
 
     public void setMaxTranslation(float aMaxTranslation) {
         mToolbarAnimator.setMaxTranslation(aMaxTranslation);
     }
 
     public void setSurfaceTranslation(float translation) {
-        ViewHelper.setTranslationY(this, translation);
+        setTranslationY(translation);
     }
 
     public float getSurfaceTranslation() {
-        return ViewHelper.getTranslationY(this);
+        return getTranslationY();
     }
 
     // Public hooks for dynamic toolbar translation
 
     public interface DynamicToolbarListener {
         public void onTranslationChanged(float aToolbarTranslation, float aLayerViewTranslation);
         public void onPanZoomStopped();
         public void onMetricsChanged(ImmutableViewportMetrics viewport);
--- a/mobile/android/tests/background/junit3/moz.build
+++ b/mobile/android/tests/background/junit3/moz.build
@@ -17,16 +17,17 @@ jar.extra_jars += [
     CONFIG['ANDROID_SUPPORT_V4_AAR_LIB'],
     CONFIG['ANDROID_RECYCLERVIEW_V7_AAR_LIB'],
     TOPOBJDIR + '/mobile/android/base/constants.jar',
     TOPOBJDIR + '/mobile/android/base/gecko-R.jar',
     TOPOBJDIR + '/mobile/android/base/gecko-browser.jar',
     TOPOBJDIR + '/mobile/android/base/gecko-mozglue.jar',
     TOPOBJDIR + '/mobile/android/base/gecko-thirdparty.jar',
     TOPOBJDIR + '/mobile/android/base/gecko-util.jar',
+    TOPOBJDIR + '/mobile/android/base/gecko-view.jar',
     TOPOBJDIR + '/mobile/android/base/services.jar',
     TOPOBJDIR + '/mobile/android/base/sync-thirdparty.jar',
 ]
 
 if CONFIG['MOZ_ANDROID_MLS_STUMBLER']:
     jar.extra_jars += [
         TOPOBJDIR + '/mobile/android/stumbler/stumbler.jar',
     ]
--- a/mobile/android/tests/browser/junit3/moz.build
+++ b/mobile/android/tests/browser/junit3/moz.build
@@ -30,16 +30,17 @@ jar.extra_jars += [
     CONFIG['ANDROID_SUPPORT_V4_AAR_LIB'],
     CONFIG['ANDROID_RECYCLERVIEW_V7_AAR_LIB'],
     TOPOBJDIR + '/mobile/android/base/constants.jar',
     TOPOBJDIR + '/mobile/android/base/gecko-R.jar',
     TOPOBJDIR + '/mobile/android/base/gecko-browser.jar',
     TOPOBJDIR + '/mobile/android/base/gecko-mozglue.jar',
     TOPOBJDIR + '/mobile/android/base/gecko-thirdparty.jar',
     TOPOBJDIR + '/mobile/android/base/gecko-util.jar',
+    TOPOBJDIR + '/mobile/android/base/gecko-view.jar',
     TOPOBJDIR + '/mobile/android/base/services.jar',
     TOPOBJDIR + '/mobile/android/base/sync-thirdparty.jar',
 ]
 
 if CONFIG['MOZ_ANDROID_MLS_STUMBLER']:
     jar.extra_jars += [
         TOPOBJDIR + '/mobile/android/stumbler/stumbler.jar',
     ]