Bug 1940581 - Remove Android ifdefs related to compositor scroll updates. r=hiro
In the future, we will need to send compositor scroll updates on all platforms, since they will drive dynamic toolbar movement and we are adding support for the dynamic toolbar in Responsive Design Mode. We might as well remove the ifdefs now as that simplifies later patches in this bug. Note that we will not start actually sending NotifyCompositorScrollUpdate IPC messages as a result of this patch, as PUICompositorController is only instantiated on Android. Differential Revision: https://phabricator.services.mozilla.com/D245523
This commit is contained in:
@@ -891,7 +891,6 @@ void APZCTreeManager::SampleForWebRender(const Maybe<VsyncId>& aVsyncId,
|
||||
aTxn.AddMinimapData(scrollId, minimapData);
|
||||
}
|
||||
|
||||
#if defined(MOZ_WIDGET_ANDROID)
|
||||
if (apzc->IsRootContent()) {
|
||||
// Send the root frame metrics to java through the UIController
|
||||
if (RefPtr<UiCompositorControllerParent> uiController =
|
||||
@@ -902,7 +901,6 @@ void APZCTreeManager::SampleForWebRender(const Maybe<VsyncId>& aVsyncId,
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// Now collect all the async transforms needed for the scrollthumbs.
|
||||
|
||||
@@ -6104,7 +6104,6 @@ bool CompositorScrollUpdate::operator==(
|
||||
mZoom == aOther.mZoom && mSource == aOther.mSource;
|
||||
}
|
||||
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
std::vector<CompositorScrollUpdate>
|
||||
AsyncPanZoomController::GetCompositorScrollUpdates() {
|
||||
RecursiveMutexAutoLock lock(mRecursiveMutex);
|
||||
@@ -6122,7 +6121,6 @@ AsyncPanZoomController::GetCompositorScrollUpdates() {
|
||||
|
||||
return {};
|
||||
}
|
||||
#endif // defined(MOZ_WIDGET_ANDROID)
|
||||
|
||||
wr::MinimapData AsyncPanZoomController::GetMinimapData() const {
|
||||
RecursiveMutexAutoLock lock(mRecursiveMutex);
|
||||
|
||||
@@ -592,7 +592,6 @@ class AsyncPanZoomController {
|
||||
const FrameMetrics& Metrics() const;
|
||||
FrameMetrics& Metrics();
|
||||
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
/**
|
||||
* Get the CompositorScrollUpdates to be sent to consumers for the current
|
||||
* composite.
|
||||
@@ -602,7 +601,6 @@ class AsyncPanZoomController {
|
||||
private:
|
||||
// Last CompositorScrollUpdate sent to GeckoView through UIController.
|
||||
CompositorScrollUpdate mLastCompositorScrollUpdate;
|
||||
#endif // defined(MOZ_WIDGET_ANDROID)
|
||||
|
||||
public:
|
||||
wr::MinimapData GetMinimapData() const;
|
||||
|
||||
@@ -230,11 +230,9 @@ UiCompositorControllerChild::RecvToolbarAnimatorMessageFromCompositor(
|
||||
mozilla::ipc::IPCResult
|
||||
UiCompositorControllerChild::RecvNotifyCompositorScrollUpdate(
|
||||
const CompositorScrollUpdate& aUpdate) {
|
||||
#if defined(MOZ_WIDGET_ANDROID)
|
||||
if (mWidget) {
|
||||
mWidget->NotifyCompositorScrollUpdate(aUpdate);
|
||||
}
|
||||
#endif // defined(MOZ_WIDGET_ANDROID)
|
||||
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
@@ -207,12 +207,10 @@ void UiCompositorControllerParent::NotifyFirstPaint() {
|
||||
|
||||
void UiCompositorControllerParent::NotifyCompositorScrollUpdate(
|
||||
const CompositorScrollUpdate& aUpdate) {
|
||||
#if defined(MOZ_WIDGET_ANDROID)
|
||||
CompositorThread()->Dispatch(NewRunnableMethod<CompositorScrollUpdate>(
|
||||
"UiCompositorControllerParent::SendNotifyCompositorScrollUpdate", this,
|
||||
&UiCompositorControllerParent::SendNotifyCompositorScrollUpdate,
|
||||
aUpdate));
|
||||
#endif
|
||||
}
|
||||
|
||||
UiCompositorControllerParent::UiCompositorControllerParent(
|
||||
|
||||
@@ -408,10 +408,11 @@ class nsBaseWidget : public nsIWidget, public nsSupportsWeakReference {
|
||||
void NotifyLiveResizeStarted();
|
||||
void NotifyLiveResizeStopped();
|
||||
|
||||
#if defined(MOZ_WIDGET_ANDROID)
|
||||
void RecvToolbarAnimatorMessageFromCompositor(int32_t) override {};
|
||||
void NotifyCompositorScrollUpdate(
|
||||
const mozilla::layers::CompositorScrollUpdate& aUpdate) override {};
|
||||
|
||||
#if defined(MOZ_WIDGET_ANDROID)
|
||||
void RecvToolbarAnimatorMessageFromCompositor(int32_t) override {};
|
||||
void RecvScreenPixels(mozilla::ipc::Shmem&& aMem, const ScreenIntSize& aSize,
|
||||
bool aNeedsYFlip) override {};
|
||||
#endif
|
||||
|
||||
@@ -2010,6 +2010,13 @@ class nsIWidget : public nsISupports {
|
||||
MOZ_ASSERT(false, "This function should only execute in Windows");
|
||||
}
|
||||
|
||||
/**
|
||||
* NotifyCompositorScrollUpdate notify widget about an update to the
|
||||
* composited scroll offset and zoom
|
||||
*/
|
||||
virtual void NotifyCompositorScrollUpdate(
|
||||
const mozilla::layers::CompositorScrollUpdate& aUpdate) = 0;
|
||||
|
||||
#if defined(MOZ_WIDGET_ANDROID)
|
||||
/**
|
||||
* RecvToolbarAnimatorMessageFromCompositor receive message from compositor
|
||||
@@ -2019,13 +2026,6 @@ class nsIWidget : public nsISupports {
|
||||
*/
|
||||
virtual void RecvToolbarAnimatorMessageFromCompositor(int32_t aMessage) = 0;
|
||||
|
||||
/**
|
||||
* NotifyCompositorScrollUpdate notify widget about an update to the
|
||||
* composited scroll offset and zoom
|
||||
*/
|
||||
virtual void NotifyCompositorScrollUpdate(
|
||||
const mozilla::layers::CompositorScrollUpdate& aUpdate) = 0;
|
||||
|
||||
/**
|
||||
* RecvScreenPixels Buffer containing the pixel from the frame buffer. Used
|
||||
* for android robocop tests.
|
||||
|
||||
Reference in New Issue
Block a user