Closed
Bug 1056159
Opened 11 years ago
Closed 11 years ago
APZCTreeManager::UpdatePanZoomControllerTree has too many arguments
Categories
(Core :: Panning and Zooming, defect)
Tracking
()
RESOLVED
FIXED
mozilla34
People
(Reporter: kats, Assigned: kats)
Details
Attachments
(3 files)
|
17.22 KB,
patch
|
botond
:
review+
|
Details | Diff | Splinter Review |
|
22.28 KB,
patch
|
Details | Diff | Splinter Review | |
|
8.40 KB,
patch
|
botond
:
review+
|
Details | Diff | Splinter Review |
See http://mxr.mozilla.org/mozilla-central/source/gfx/layers/apz/src/APZCTreeManager.cpp?rev=413e0473a1d8#190. It's getting a little out of hand. As part of my work for bug 1055760 I cleaned this up a bit. I'd like to land the refactoring even if we don't end up doing bug 1055760 so I'm splitting it into a separate bug.
| Assignee | ||
Comment 1•11 years ago
|
||
Attachment #8475970 -
Flags: review?(botond)
| Assignee | ||
Comment 2•11 years ago
|
||
Attachment #8475971 -
Flags: review?(botond)
| Assignee | ||
Comment 3•11 years ago
|
||
| Assignee | ||
Comment 4•11 years ago
|
||
| try | ||
Try push including these patches: https://tbpl.mozilla.org/?tree=Try&rev=ca10ab9d4739
Comment 5•11 years ago
|
||
Comment on attachment 8475970 [details] [diff] [review]
Part 1 - Add the TreeBuildingState helper struct
Review of attachment 8475970 [details] [diff] [review]:
-----------------------------------------------------------------
::: gfx/layers/apz/src/APZCTreeManager.cpp
@@ +52,5 @@
> + const bool mIsFirstPaint;
> + const uint64_t mOriginatingLayersId;
> +
> + // State that is updated as we perform the tree build
> + APZPaintLogHelper mPaintLogger;
The LogTestData() methods of APZPaintLogHelper are 'const', so this field can be made const and put into the "state that doesn't change" category.
Attachment #8475970 -
Flags: review?(botond) → review+
Comment 6•11 years ago
|
||
Comment on attachment 8475975 [details] [diff] [review]
Part 2 (diff ignoring whitespace)
Review of attachment 8475975 [details] [diff] [review]:
-----------------------------------------------------------------
::: gfx/layers/apz/src/APZCTreeManager.h
@@ +366,5 @@
> const ZoomConstraints& aConstraints);
>
> + AsyncPanZoomController* PrepareAPZCForLayer(const Layer* aLayer,
> + const FrameMetrics& aMetrics,
> + const uint64_t& aLayersId,
Let's remain consistent with UPZCT in passing uint64_t by value.
@@ +370,5 @@
> + const uint64_t& aLayersId,
> + const gfx::Matrix4x4& aAncestorTransform,
> + const nsIntRegion& aObscured,
> + AsyncPanZoomController*& aParent,
> + AsyncPanZoomController*& aNextSibling,
aOutParent, aOutNextSibling
Attachment #8475975 -
Flags: review+
Comment 7•11 years ago
|
||
Comment on attachment 8475971 [details] [diff] [review]
Part 2 - Extract a helper function
Review of attachment 8475971 [details] [diff] [review]:
-----------------------------------------------------------------
See ignoring-whitespace patch.
Attachment #8475971 -
Flags: review?(botond)
| Assignee | ||
Comment 8•11 years ago
|
||
Updated per comments above.
remote: https://hg.mozilla.org/integration/b2g-inbound/rev/a84e852880b9
remote: https://hg.mozilla.org/integration/b2g-inbound/rev/1f79d92c1c7c
Comment 9•11 years ago
|
||
(In reply to Botond Ballo [:botond] from comment #6)
> @@ +370,5 @@
> > + const uint64_t& aLayersId,
> > + const gfx::Matrix4x4& aAncestorTransform,
> > + const nsIntRegion& aObscured,
> > + AsyncPanZoomController*& aParent,
> > + AsyncPanZoomController*& aNextSibling,
>
> aOutParent, aOutNextSibling
On closer look, we don't actually use aOutNextSibling as an 'out' parameter. We could have just passed the pointer by value.
https://hg.mozilla.org/mozilla-central/rev/a84e852880b9
https://hg.mozilla.org/mozilla-central/rev/1f79d92c1c7c
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in
before you can comment on or make changes to this bug.
Description
•