mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Clean up APZCTM initialization on Android. (bug 1110540 part 3, r=kats)
This commit is contained in:
parent
d556e1e7b3
commit
2a09e33abb
@ -2496,18 +2496,26 @@ nsWindow::NewCompositorParent(int aSurfaceWidth, int aSurfaceHeight)
|
||||
mozilla::layers::APZCTreeManager*
|
||||
nsWindow::GetAPZCTreeManager()
|
||||
{
|
||||
if (!sApzcTreeManager) {
|
||||
CompositorParent* compositor = sCompositorParent;
|
||||
if (!compositor) {
|
||||
return nullptr;
|
||||
}
|
||||
uint64_t rootLayerTreeId = compositor->RootLayerTreeId();
|
||||
CompositorParent::SetControllerForLayerTree(rootLayerTreeId, mozilla::widget::android::APZCCallbackHandler::GetInstance());
|
||||
sApzcTreeManager = CompositorParent::GetAPZCTreeManager(rootLayerTreeId);
|
||||
}
|
||||
return sApzcTreeManager;
|
||||
}
|
||||
|
||||
void
|
||||
nsWindow::ConfigureAPZCTreeManager()
|
||||
{
|
||||
nsBaseWidget::ConfigureAPZCTreeManager();
|
||||
if (!sApzcTreeManager) {
|
||||
sApzcTreeManager = mAPZC;
|
||||
}
|
||||
}
|
||||
|
||||
already_AddRefed<GeckoContentController>
|
||||
nsWindow::CreateRootContentController()
|
||||
{
|
||||
nsRefPtr<widget::android::APZCCallbackHandler> controller =
|
||||
widget::android::APZCCallbackHandler::GetInstance();
|
||||
return controller.forget();
|
||||
}
|
||||
|
||||
uint64_t
|
||||
nsWindow::RootLayerTreeId()
|
||||
{
|
||||
|
@ -174,6 +174,9 @@ protected:
|
||||
void PostFlushIMEChanges();
|
||||
void FlushIMEChanges();
|
||||
|
||||
void ConfigureAPZCTreeManager() MOZ_OVERRIDE;
|
||||
already_AddRefed<GeckoContentController> CreateRootContentController() MOZ_OVERRIDE;
|
||||
|
||||
// Call this function when the users activity is the direct cause of an
|
||||
// event (like a keypress or mouse click).
|
||||
void UserActivity();
|
||||
|
Loading…
Reference in New Issue
Block a user