Skip to content

Commit

Permalink
Drop ScrollUpdate API, SendAsyncScrollEvent efficient enough
Browse files Browse the repository at this point in the history
  • Loading branch information
tmeshkova committed Feb 25, 2014
1 parent 7057179 commit 0c435c5
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 29 deletions.
1 change: 0 additions & 1 deletion embedding/embedlite/EmbedLiteView.h
Expand Up @@ -66,7 +66,6 @@ class EmbedLiteViewListener
virtual bool AcknowledgeScrollUpdate(const uint32_t& aViewID, const uint32_t& aScrollGeneration) { return false; }
virtual bool SendAsyncScrollDOMEvent(const gfxRect& aContentRect,
const gfxSize& aScrollableSize) { return false; }
virtual bool ScrollUpdate(const gfxPoint& aPosition, const float aResolution) { return false; }
// Some GL Context implementations require Platform GL context to be active and valid
virtual bool RequestCurrentGLContext() { return false; }
};
Expand Down
14 changes: 0 additions & 14 deletions embedding/embedlite/embedthread/EmbedContentController.cpp
Expand Up @@ -118,20 +118,6 @@ void EmbedContentController::SendAsyncScrollDOMEvent(bool aIsRoot,
}
}

void EmbedContentController::ScrollUpdate(const CSSPoint& aPosition, const float aResolution)
{
if (MessageLoop::current() != mUILoop) {
// We have to send this message from the "UI thread" (main
// thread).
mUILoop->PostTask(
FROM_HERE,
NewRunnableMethod(this, &EmbedContentController::ScrollUpdate,
aPosition, aResolution));
return;
}
GetListener()->ScrollUpdate(gfxPoint(aPosition.x, aPosition.y), aResolution);
}

void EmbedContentController::AcknowledgeScrollUpdate(const FrameMetrics::ViewID& aScrollId, const uint32_t& aScrollGeneration)
{
if (MessageLoop::current() != mUILoop) {
Expand Down
1 change: 0 additions & 1 deletion embedding/embedlite/embedthread/EmbedContentController.h
Expand Up @@ -39,7 +39,6 @@ class EmbedContentController : public mozilla::layers::GeckoContentController
virtual void SendAsyncScrollDOMEvent(bool aIsRoot,
const CSSRect& aContentRect,
const CSSSize& aScrollableSize) MOZ_OVERRIDE;
virtual void ScrollUpdate(const CSSPoint& aPosition, const float aResolution) MOZ_OVERRIDE;
virtual void AcknowledgeScrollUpdate(const FrameMetrics::ViewID&, const uint32_t&) MOZ_OVERRIDE;
void ClearRenderFrame();
virtual void PostDelayedTask(Task* aTask, int aDelayMs) MOZ_OVERRIDE;
Expand Down
7 changes: 0 additions & 7 deletions gfx/layers/ipc/AsyncPanZoomController.cpp
Expand Up @@ -2014,23 +2014,16 @@ void AsyncPanZoomController::SendAsyncScrollEvent() {
bool isRoot;
CSSRect contentRect;
CSSSize scrollableSize;
CSSToScreenScale resolution;
CSSPoint scrollOffset;
{
ReentrantMonitorAutoEnter lock(mMonitor);

isRoot = mFrameMetrics.mIsRoot;
scrollableSize = mFrameMetrics.mScrollableRect.Size();
contentRect = mFrameMetrics.CalculateCompositedRectInCssPixels();
contentRect.MoveTo(mCurrentAsyncScrollOffset);
resolution = mFrameMetrics.mZoom;
scrollOffset = mFrameMetrics.mScrollOffset;
}

controller->SendAsyncScrollDOMEvent(isRoot, contentRect, scrollableSize);
if (isRoot) {
controller->ScrollUpdate(scrollOffset, resolution.scale);
}
}

bool AsyncPanZoomController::Matches(const ScrollableLayerGuid& aGuid)
Expand Down
2 changes: 0 additions & 2 deletions gfx/layers/ipc/GeckoContentController.h
Expand Up @@ -81,8 +81,6 @@ class GeckoContentController
const CSSRect &aContentRect,
const CSSSize &aScrollableSize) = 0;

virtual void ScrollUpdate(const CSSPoint& aPosition, const float aResolution) = 0;

/**
* Schedules a runnable to run on the controller/UI thread at some time
* in the future.
Expand Down
4 changes: 0 additions & 4 deletions layout/ipc/RenderFrameParent.cpp
Expand Up @@ -641,10 +641,6 @@ class RemoteContentController : public GeckoContentController {
MessageLoop::current()->PostDelayedTask(FROM_HERE, aTask, aDelayMs);
}

virtual void ScrollUpdate(const CSSPoint& aPosition, const float aResolution)
{
}

virtual bool GetRootZoomConstraints(ZoomConstraints* aOutConstraints)
{
if (mHaveZoomConstraints && aOutConstraints) {
Expand Down

0 comments on commit 0c435c5

Please sign in to comment.