Bug 1213095 - Inline the DispatchRepaintRequest function. r=botond

--HG--
extra : commitid : DrbeUIsKQbQ
This commit is contained in:
Kartikaya Gupta 2016-01-18 15:23:08 -05:00
Родитель 152d87207c
Коммит c44f6aace4
2 изменённых файлов: 13 добавлений и 26 удалений

Просмотреть файл

@ -2808,6 +2808,17 @@ void AsyncPanZoomController::RequestContentRepaint() {
RequestContentRepaint(mFrameMetrics);
}
/*static*/ CSSRect
GetDisplayPortRect(const FrameMetrics& aFrameMetrics)
{
// This computation is based on what happens in CalculatePendingDisplayPort. If that
// changes then this might need to change too
CSSRect baseRect(aFrameMetrics.GetScrollOffset(),
aFrameMetrics.CalculateBoundedCompositedSizeInCssPixels());
baseRect.Inflate(aFrameMetrics.GetDisplayPortMargins() / aFrameMetrics.DisplayportPixelsPerCSSPixel());
return baseRect;
}
void AsyncPanZoomController::RequestContentRepaint(FrameMetrics& aFrameMetrics)
{
ParentLayerPoint velocity = GetVelocityVector();
@ -2836,25 +2847,6 @@ void AsyncPanZoomController::RequestContentRepaint(FrameMetrics& aFrameMetrics)
}
aFrameMetrics.SetPaintRequestTime(TimeStamp::Now());
DispatchRepaintRequest(aFrameMetrics, velocity);
aFrameMetrics.SetPresShellId(mLastContentPaintMetrics.GetPresShellId());
}
/*static*/ CSSRect
GetDisplayPortRect(const FrameMetrics& aFrameMetrics)
{
// This computation is based on what happens in CalculatePendingDisplayPort. If that
// changes then this might need to change too
CSSRect baseRect(aFrameMetrics.GetScrollOffset(),
aFrameMetrics.CalculateBoundedCompositedSizeInCssPixels());
baseRect.Inflate(aFrameMetrics.GetDisplayPortMargins() / aFrameMetrics.DisplayportPixelsPerCSSPixel());
return baseRect;
}
void
AsyncPanZoomController::DispatchRepaintRequest(const FrameMetrics& aFrameMetrics,
const ParentLayerPoint& aVelocity)
{
RefPtr<GeckoContentController> controller = GetGeckoContentController();
if (!controller) {
return;
@ -2863,7 +2855,7 @@ AsyncPanZoomController::DispatchRepaintRequest(const FrameMetrics& aFrameMetrics
APZC_LOG_FM(aFrameMetrics, "%p requesting content repaint", this);
if (mCheckerboardEvent) {
std::stringstream info;
info << " velocity " << aVelocity;
info << " velocity " << velocity;
std::string str = info.str();
mCheckerboardEvent->UpdateRendertraceProperty(
CheckerboardEvent::RequestedDisplayPort, GetDisplayPortRect(aFrameMetrics),
@ -2878,6 +2870,7 @@ AsyncPanZoomController::DispatchRepaintRequest(const FrameMetrics& aFrameMetrics
}
mExpectedGeckoMetrics = aFrameMetrics;
mLastPaintRequestMetrics = aFrameMetrics;
aFrameMetrics.SetPresShellId(mLastContentPaintMetrics.GetPresShellId());
}
bool AsyncPanZoomController::UpdateAnimation(const TimeStamp& aSampleTime,

Просмотреть файл

@ -593,12 +593,6 @@ protected:
*/
void RequestContentRepaint(FrameMetrics& aFrameMetrics);
/**
* Actually send the next pending paint request to gecko.
*/
void DispatchRepaintRequest(const FrameMetrics& aFrameMetrics,
const ParentLayerPoint& aVelocity);
/**
* Gets the current frame metrics. This is *not* the Gecko copy stored in the
* layers code.