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);
|
aTxn.AddMinimapData(scrollId, minimapData);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(MOZ_WIDGET_ANDROID)
|
|
||||||
if (apzc->IsRootContent()) {
|
if (apzc->IsRootContent()) {
|
||||||
// Send the root frame metrics to java through the UIController
|
// Send the root frame metrics to java through the UIController
|
||||||
if (RefPtr<UiCompositorControllerParent> 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.
|
// Now collect all the async transforms needed for the scrollthumbs.
|
||||||
|
|||||||
@@ -6104,7 +6104,6 @@ bool CompositorScrollUpdate::operator==(
|
|||||||
mZoom == aOther.mZoom && mSource == aOther.mSource;
|
mZoom == aOther.mZoom && mSource == aOther.mSource;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef MOZ_WIDGET_ANDROID
|
|
||||||
std::vector<CompositorScrollUpdate>
|
std::vector<CompositorScrollUpdate>
|
||||||
AsyncPanZoomController::GetCompositorScrollUpdates() {
|
AsyncPanZoomController::GetCompositorScrollUpdates() {
|
||||||
RecursiveMutexAutoLock lock(mRecursiveMutex);
|
RecursiveMutexAutoLock lock(mRecursiveMutex);
|
||||||
@@ -6122,7 +6121,6 @@ AsyncPanZoomController::GetCompositorScrollUpdates() {
|
|||||||
|
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
#endif // defined(MOZ_WIDGET_ANDROID)
|
|
||||||
|
|
||||||
wr::MinimapData AsyncPanZoomController::GetMinimapData() const {
|
wr::MinimapData AsyncPanZoomController::GetMinimapData() const {
|
||||||
RecursiveMutexAutoLock lock(mRecursiveMutex);
|
RecursiveMutexAutoLock lock(mRecursiveMutex);
|
||||||
|
|||||||
@@ -592,7 +592,6 @@ class AsyncPanZoomController {
|
|||||||
const FrameMetrics& Metrics() const;
|
const FrameMetrics& Metrics() const;
|
||||||
FrameMetrics& Metrics();
|
FrameMetrics& Metrics();
|
||||||
|
|
||||||
#ifdef MOZ_WIDGET_ANDROID
|
|
||||||
/**
|
/**
|
||||||
* Get the CompositorScrollUpdates to be sent to consumers for the current
|
* Get the CompositorScrollUpdates to be sent to consumers for the current
|
||||||
* composite.
|
* composite.
|
||||||
@@ -602,7 +601,6 @@ class AsyncPanZoomController {
|
|||||||
private:
|
private:
|
||||||
// Last CompositorScrollUpdate sent to GeckoView through UIController.
|
// Last CompositorScrollUpdate sent to GeckoView through UIController.
|
||||||
CompositorScrollUpdate mLastCompositorScrollUpdate;
|
CompositorScrollUpdate mLastCompositorScrollUpdate;
|
||||||
#endif // defined(MOZ_WIDGET_ANDROID)
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wr::MinimapData GetMinimapData() const;
|
wr::MinimapData GetMinimapData() const;
|
||||||
|
|||||||
@@ -230,11 +230,9 @@ UiCompositorControllerChild::RecvToolbarAnimatorMessageFromCompositor(
|
|||||||
mozilla::ipc::IPCResult
|
mozilla::ipc::IPCResult
|
||||||
UiCompositorControllerChild::RecvNotifyCompositorScrollUpdate(
|
UiCompositorControllerChild::RecvNotifyCompositorScrollUpdate(
|
||||||
const CompositorScrollUpdate& aUpdate) {
|
const CompositorScrollUpdate& aUpdate) {
|
||||||
#if defined(MOZ_WIDGET_ANDROID)
|
|
||||||
if (mWidget) {
|
if (mWidget) {
|
||||||
mWidget->NotifyCompositorScrollUpdate(aUpdate);
|
mWidget->NotifyCompositorScrollUpdate(aUpdate);
|
||||||
}
|
}
|
||||||
#endif // defined(MOZ_WIDGET_ANDROID)
|
|
||||||
|
|
||||||
return IPC_OK();
|
return IPC_OK();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -207,12 +207,10 @@ void UiCompositorControllerParent::NotifyFirstPaint() {
|
|||||||
|
|
||||||
void UiCompositorControllerParent::NotifyCompositorScrollUpdate(
|
void UiCompositorControllerParent::NotifyCompositorScrollUpdate(
|
||||||
const CompositorScrollUpdate& aUpdate) {
|
const CompositorScrollUpdate& aUpdate) {
|
||||||
#if defined(MOZ_WIDGET_ANDROID)
|
|
||||||
CompositorThread()->Dispatch(NewRunnableMethod<CompositorScrollUpdate>(
|
CompositorThread()->Dispatch(NewRunnableMethod<CompositorScrollUpdate>(
|
||||||
"UiCompositorControllerParent::SendNotifyCompositorScrollUpdate", this,
|
"UiCompositorControllerParent::SendNotifyCompositorScrollUpdate", this,
|
||||||
&UiCompositorControllerParent::SendNotifyCompositorScrollUpdate,
|
&UiCompositorControllerParent::SendNotifyCompositorScrollUpdate,
|
||||||
aUpdate));
|
aUpdate));
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
UiCompositorControllerParent::UiCompositorControllerParent(
|
UiCompositorControllerParent::UiCompositorControllerParent(
|
||||||
|
|||||||
@@ -408,10 +408,11 @@ class nsBaseWidget : public nsIWidget, public nsSupportsWeakReference {
|
|||||||
void NotifyLiveResizeStarted();
|
void NotifyLiveResizeStarted();
|
||||||
void NotifyLiveResizeStopped();
|
void NotifyLiveResizeStopped();
|
||||||
|
|
||||||
#if defined(MOZ_WIDGET_ANDROID)
|
|
||||||
void RecvToolbarAnimatorMessageFromCompositor(int32_t) override {};
|
|
||||||
void NotifyCompositorScrollUpdate(
|
void NotifyCompositorScrollUpdate(
|
||||||
const mozilla::layers::CompositorScrollUpdate& aUpdate) override {};
|
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,
|
void RecvScreenPixels(mozilla::ipc::Shmem&& aMem, const ScreenIntSize& aSize,
|
||||||
bool aNeedsYFlip) override {};
|
bool aNeedsYFlip) override {};
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -2010,6 +2010,13 @@ class nsIWidget : public nsISupports {
|
|||||||
MOZ_ASSERT(false, "This function should only execute in Windows");
|
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)
|
#if defined(MOZ_WIDGET_ANDROID)
|
||||||
/**
|
/**
|
||||||
* RecvToolbarAnimatorMessageFromCompositor receive message from compositor
|
* RecvToolbarAnimatorMessageFromCompositor receive message from compositor
|
||||||
@@ -2019,13 +2026,6 @@ class nsIWidget : public nsISupports {
|
|||||||
*/
|
*/
|
||||||
virtual void RecvToolbarAnimatorMessageFromCompositor(int32_t aMessage) = 0;
|
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
|
* RecvScreenPixels Buffer containing the pixel from the frame buffer. Used
|
||||||
* for android robocop tests.
|
* for android robocop tests.
|
||||||
|
|||||||
Reference in New Issue
Block a user