mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Bug 823066 - Provide API for CompositorParent to use custom AsyncPanZoomController. r=drs
--HG-- extra : rebase_source : b2bfaa468261d0a270719215c2bf89c361d0145e
This commit is contained in:
parent
81c076fba4
commit
a233ad4a43
@ -791,8 +791,16 @@ CompositorParent::ApplyAsyncContentTransformToTree(TimeStamp aCurrentFrame,
|
||||
return appliedTransform;
|
||||
}
|
||||
|
||||
AsyncPanZoomController* controller = nullptr;
|
||||
// Check if an AsyncPanZoomController is attached to this layer.
|
||||
if (LayerUserData* data = aLayer->GetUserData(&sPanZoomUserDataKey)) {
|
||||
AsyncPanZoomController* controller = static_cast<PanZoomUserData*>(data)->mController;
|
||||
controller = static_cast<PanZoomUserData*>(data)->mController;
|
||||
} else {
|
||||
// Check if a derived implementation provides a default AsyncPanZoomController.
|
||||
controller = GetDefaultPanZoomController();
|
||||
}
|
||||
|
||||
if (controller) {
|
||||
ShadowLayer* shadow = aLayer->AsShadowLayer();
|
||||
|
||||
gfx3DMatrix newTransform;
|
||||
|
@ -171,6 +171,10 @@ protected:
|
||||
virtual void SyncViewportInfo(const nsIntRect& aDisplayPort, float aDisplayResolution, bool aLayersUpdated,
|
||||
nsIntPoint& aScrollOffset, float& aScaleX, float& aScaleY);
|
||||
void SetEGLSurfaceSize(int width, int height);
|
||||
// If SetPanZoomControllerForLayerTree is not set, Compositor will use
|
||||
// derived class AsyncPanZoomController transformations.
|
||||
// Compositor will not own AsyncPanZoomController here.
|
||||
virtual AsyncPanZoomController* GetDefaultPanZoomController() { return nullptr; }
|
||||
|
||||
private:
|
||||
void PauseComposition();
|
||||
|
Loading…
Reference in New Issue
Block a user