Closed Bug 823066 Opened 12 years ago Closed 12 years ago

Provide API for CompositorParent to use custom AsyncPanZoomController

Categories

(Core :: Graphics: Layers, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla20

People

(Reporter: romaxa, Assigned: romaxa)

References

Details

Attachments

(1 file, 1 obsolete file)

I'm working on embedding API's which does rendering via CompositorParent implementation (fast and responsive embedding) see 746800. Source code available here: https://github.com/romaxa/mozilla-central/commits/embedlite And I was able to reuse Gecko AsyncPanZoomController in that implementation with small additional change to CompositorParent. idea of this change is to allow to get AsyncPanZoomController from derived CompositorParent class and allow to use it in compositor parent without LayerTree ID's and other static lists manipulation.
With this patch and this implementation https://github.com/romaxa/mozilla-central/commit/d959d00b1ec6c51a05bf533b26ff8c8ecc01f466#L6L13 I got nice working zooming,scrolling implementation almost out of the box. Thanks for this component.
Assignee: nobody → romaxa
Status: NEW → ASSIGNED
Attachment #693895 - Flags: review?(bugzilla)
Comment on attachment 693895 [details] [diff] [review] Allow to use custom AsyncPanZoomController in compositor Review of attachment 693895 [details] [diff] [review]: ----------------------------------------------------------------- I don't like the naming here and I think this could use more commenting. ::: gfx/layers/ipc/CompositorParent.cpp @@ +795,4 @@ > if (LayerUserData* data = aLayer->GetUserData(&sPanZoomUserDataKey)) { > + controller = static_cast<PanZoomUserData*>(data)->mController; > + } else { > + controller = GetPanZoomController(); This is basically saying "if the layer has an APZC, use it, otherwise try to get some arbitrary derived implementation's APZC." The "GetPanZoomController()" name doesn't give enough information about how it's intended to be used. Even something like "GetDefaultPanZoomController()" might work.
Attachment #693895 - Flags: review?(bugzilla) → review-
Hope this is better.
Attachment #693895 - Attachment is obsolete: true
Attachment #694212 - Flags: review?(bugzilla)
Comment on attachment 694212 [details] [diff] [review] Allow to use custom AsyncPanZoomController in compositor Review of attachment 694212 [details] [diff] [review]: ----------------------------------------------------------------- Cool, just a couple of comment nits. ::: gfx/layers/ipc/CompositorParent.cpp @@ +791,5 @@ > return appliedTransform; > } > > + AsyncPanZoomController* controller = nullptr; > + // Check if AsyncPanZoomController attached to the layer // Check if an AsyncPanZoomController is attached to this layer. @@ +796,4 @@ > if (LayerUserData* data = aLayer->GetUserData(&sPanZoomUserDataKey)) { > + controller = static_cast<PanZoomUserData*>(data)->mController; > + } else { > + // check if derived class provide AsyncPanZoomController // Check if a derived implementation provides a default AsyncPanZoomController.
Attachment #694212 - Flags: review?(bugzilla) → review+
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: