mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-03 15:26:07 +00:00
Bug 798194 - Fix repaint request re-ordering bug. r=roc
This commit is contained in:
parent
c62bae3675
commit
ac8098c6d0
@ -489,19 +489,12 @@ public:
|
||||
|
||||
virtual void RequestContentRepaint(const FrameMetrics& aFrameMetrics) MOZ_OVERRIDE
|
||||
{
|
||||
if (MessageLoop::current() != mUILoop) {
|
||||
// We have to send this message from the "UI thread" (main
|
||||
// thread).
|
||||
mUILoop->PostTask(
|
||||
FROM_HERE,
|
||||
NewRunnableMethod(this, &RemoteContentController::RequestContentRepaint,
|
||||
aFrameMetrics));
|
||||
return;
|
||||
}
|
||||
if (mRenderFrame) {
|
||||
TabParent* browser = static_cast<TabParent*>(mRenderFrame->Manager());
|
||||
browser->UpdateFrame(aFrameMetrics);
|
||||
}
|
||||
// We always need to post requests into the "UI thread" otherwise the
|
||||
// requests may get processed out of order.
|
||||
mUILoop->PostTask(
|
||||
FROM_HERE,
|
||||
NewRunnableMethod(this, &RemoteContentController::DoRequestContentRepaint,
|
||||
aFrameMetrics));
|
||||
}
|
||||
|
||||
virtual void HandleDoubleTap(const nsIntPoint& aPoint) MOZ_OVERRIDE
|
||||
@ -558,6 +551,14 @@ public:
|
||||
void ClearRenderFrame() { mRenderFrame = nullptr; }
|
||||
|
||||
private:
|
||||
void DoRequestContentRepaint(const FrameMetrics& aFrameMetrics)
|
||||
{
|
||||
if (mRenderFrame) {
|
||||
TabParent* browser = static_cast<TabParent*>(mRenderFrame->Manager());
|
||||
browser->UpdateFrame(aFrameMetrics);
|
||||
}
|
||||
}
|
||||
|
||||
MessageLoop* mUILoop;
|
||||
RenderFrameParent* mRenderFrame;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user