Closed Bug 777075 Opened 13 years ago Closed 13 years ago

Extract an interface for the PanZoomController -> LayerController dependency

Categories

(Firefox for Android Graveyard :: Toolbar, defect)

All
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 17

People

(Reporter: kats, Assigned: kats)

References

Details

Attachments

(7 files)

As long as PZC depends directly on LayerController it can't be moved to native code
Comment on attachment 645503 [details] [diff] [review] Part 1 - Refactor PZC to consolidate code that accesses viewport metrics mbrubeck, requesting review from you for this patch set since you worked on the zoom-related functions in part 2. The rest of the patches could be reviewed by anybody really since it's just moving code around without making functional changes. Feel free to decline if you don't want to review it.
Attachment #645503 - Flags: review?(mbrubeck)
Attachment #645504 - Flags: review?(mbrubeck)
Comment on attachment 645505 [details] [diff] [review] Part 3 - Eliminate getViewport and getZoomFactor This one actually has a small correctness fix as well - the change to LayerRenderer uses mFrameMetrics instead of the LayerController's viewport metrics, which is correct from a threading point of view (this code runs on the compositor thread which is supposed to use mFrameMetrics)
Attachment #645505 - Flags: review?(mbrubeck)
Attachment #645506 - Flags: review?(mbrubeck)
Attachment #645758 - Flags: review?(mbrubeck)
Attachment #645759 - Flags: review?(mbrubeck)
Comment on attachment 645760 [details] [diff] [review] Part 7 - Remove notifyLayerClientOfGeometryChange from the PanZoomTarget interface This one has a side-effect of forcing a redraw after gecko loads, which is probably unnecessary but also pretty harmless.
Attachment #645760 - Flags: review?(mbrubeck)
Attachment #645503 - Flags: review?(mbrubeck) → review+
Attachment #645504 - Flags: review?(mbrubeck) → review+
Attachment #645505 - Flags: review?(mbrubeck) → review+
Attachment #645506 - Flags: review?(mbrubeck) → review+
Comment on attachment 645758 [details] [diff] [review] Part 5 - Move scrollBy and scaleWithFocus into PZC Review of attachment 645758 [details] [diff] [review]: ----------------------------------------------------------------- ::: mobile/android/base/gfx/LayerController.java @@ -140,5 @@ > - viewportMetrics.setOrigin(origin); > - mViewportMetrics = new ImmutableViewportMetrics(viewportMetrics); > - > - notifyLayerClientOfGeometryChange(); > - mView.requestRender(); Just as a note to myself: In the new code, setViewportMetrics is responsible for calling mView.requestRender().
Attachment #645758 - Flags: review?(mbrubeck) → review+
Attachment #645759 - Flags: review?(mbrubeck) → review+
Attachment #645760 - Flags: review?(mbrubeck) → review+
(Landed these involved some rebasing since the code has changed a bunch since I wrote the patches, but there wasn't anything too significant)
The R1 failures were apparently caused by the fact that my new patches change the initial value of Tab.getAllowZoom() from false to true. Previously the mAllowZoom was uninitialized in Tab, and java defaulted it to false. In my patches I created a new ZoomConstraints which had it defaulted to true, and that change in behaviour caused the zoom calculations to be wrong, or so it would appear. I'm not entirely sure why that happened, since I thought that the zoom constraints should always be getting set before we use them, but I guess not. I added this additional change: https://hg.mozilla.org/try/rev/77b37e4283e4 and it fixed the R1 failures (try run at https://tbpl.mozilla.org/?tree=Try&rev=06b1f3484b9c). Will rebase and land.
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: