Closed Bug 1238761 Opened 9 years ago Closed 9 years ago

Make APZ support multiple GeckoViews

Categories

(Firefox for Android Graveyard :: Toolbar, defect)

All
Android
defect
Not set
normal

Tracking

(firefox46 fixed)

RESOLVED FIXED
Firefox 46
Tracking Status
firefox46 --- fixed

People

(Reporter: jchen, Assigned: jchen)

References

Details

Attachments

(8 files)

No description provided.
This patch turns NativePanZoomController's MotionEvent handler into a native method, and it adds the WrapForJNI annotations to all native methods so that bindings will be automatically generated for them.
Attachment #8706639 - Flags: review?(rbarker)
This patch adds specializations of jni::Ref for primitive arrays like IntArray and FloatArray, so that the arrays can be accessed through the GetElement, GetElements, and Length members.
Attachment #8706640 - Flags: review?(snorp)
This patch adds the NPZCSupport class to nsWindow and use it to implement the NPZC native methods that were implemented in AndroidJNI.cpp. For HandleMotionEvent, the code also includes a portion from AndroidJavaWrapper::MakeMultitouchEvent.
Attachment #8706641 - Flags: review?(rbarker)
This patch adds a way to attach a particular NativePanZoomController instance held by LayerView to a particular nsWindow instance. Because LayerView already calls GLController.SetLayerClient during initialization, this patch renames it to attachToJava and modifies it to accept an additional NPZC parameter. In the new AttachToJava implementation, we create or reuse a NPZCSupport object and associate it with the NPZC instance.
Attachment #8706642 - Flags: review?(snorp)
This patch rewrites AndroidContentController to get rid of any dependencies on a static nsWindow or APZC tree manager.
Attachment #8706643 - Flags: review?(rbarker)
Attached patch Remove obsolete APZ code (v1) (deleted) — Splinter Review
With APZC supporting multiple nsWindows, this patch removes some obsolete APZ code, including the previous implementation of NativePanZoomController native methods in AndroidJNI.cpp, and the various static members of nsWindow.
Attachment #8706644 - Flags: review?(rbarker)
This patch autogenerates constants for MotionEvent to replace the manual definitions in AndroidJavaWrappers.
Attachment #8706646 - Flags: review?(snorp)
Attachment #8706644 - Flags: review?(rbarker) → review+
Attachment #8706640 - Flags: review?(snorp) → review+
Attachment #8706642 - Flags: review?(snorp) → review+
Comment on attachment 8706639 [details] [diff] [review] Switch NativePanZoomController to use native methods (v1) Review of attachment 8706639 [details] [diff] [review]: ----------------------------------------------------------------- ::: mobile/android/base/java/org/mozilla/gecko/gfx/NativePanZoomController.java @@ +45,5 @@ > + final float[] toolMinor = new float[count]; > + > + final MotionEvent.PointerCoords coords = new MotionEvent.PointerCoords(); > + final PointF point = !keepInViewCoordinates ? new PointF() : null; > + final float zoom = !keepInViewCoordinates ? mView.getViewportMetrics().zoomFactor : 0.0f; If the default is 1.0f and not 0.0f you wouldn't need the if check on line 69. This obviously fine the way it is, I just get nervous when I see a variable set to 0.0 and then used in a divide later.
Attachment #8706639 - Flags: review?(rbarker) → review+
Attachment #8706646 - Flags: review?(snorp) → review+
Attachment #8706641 - Flags: review?(rbarker) → review+
Attachment #8706643 - Flags: review?(rbarker) → review+
Fix bustage for non-APZ builds. r=me
Attachment #8709270 - Flags: review+
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: