зеркало из https://github.com/mozilla/gecko-dev.git
Turn apz.use_paint_duration off. (bug 1192919 part 4, r=kats)
--HG-- extra : commitid : 9gfykJXaFJE
This commit is contained in:
Родитель
dd65d500c0
Коммит
bbce6296fd
|
@ -86,11 +86,10 @@ struct APZCTreeManager::TreeBuildingState {
|
|||
/*static*/ const ScreenMargin
|
||||
APZCTreeManager::CalculatePendingDisplayPort(
|
||||
const FrameMetrics& aFrameMetrics,
|
||||
const ParentLayerPoint& aVelocity,
|
||||
double aEstimatedPaintDuration)
|
||||
const ParentLayerPoint& aVelocity)
|
||||
{
|
||||
return AsyncPanZoomController::CalculatePendingDisplayPort(
|
||||
aFrameMetrics, aVelocity, aEstimatedPaintDuration);
|
||||
aFrameMetrics, aVelocity);
|
||||
}
|
||||
|
||||
APZCTreeManager::APZCTreeManager()
|
||||
|
|
|
@ -286,8 +286,7 @@ public:
|
|||
*/
|
||||
static const ScreenMargin CalculatePendingDisplayPort(
|
||||
const FrameMetrics& aFrameMetrics,
|
||||
const ParentLayerPoint& aVelocity,
|
||||
double aEstimatedPaintDuration);
|
||||
const ParentLayerPoint& aVelocity);
|
||||
|
||||
/**
|
||||
* Set the dpi value used by all AsyncPanZoomControllers.
|
||||
|
|
|
@ -239,9 +239,6 @@ using mozilla::gfx::PointTyped;
|
|||
* rather than using the "stationary" multipliers.\n
|
||||
* Units: CSS pixels per millisecond
|
||||
*
|
||||
* \li\b apz.num_paint_duration_samples
|
||||
* Number of samples to store of how long it took to paint after the previous
|
||||
*
|
||||
* \li\b apz.overscroll.enabled
|
||||
* Pref that enables overscrolling. If this is disabled, excess scroll that
|
||||
* cannot be handed off is discarded.
|
||||
|
@ -303,12 +300,6 @@ using mozilla::gfx::PointTyped;
|
|||
* within this distance on scrollable frames.\n
|
||||
* Units: (real-world, i.e. screen) inches
|
||||
*
|
||||
* \li\b apz.use_paint_duration
|
||||
* Whether or not to use the estimated paint duration as a factor when projecting
|
||||
* the displayport in the direction of scrolling. If this value is set to false,
|
||||
* a constant 50ms paint time is used; the projection can be scaled as desired
|
||||
* using the \b apz.velocity_bias pref below.
|
||||
*
|
||||
* \li\b apz.velocity_bias
|
||||
* How much to adjust the displayport in the direction of scrolling. This value
|
||||
* is multiplied by the velocity and added to the displayport offset.
|
||||
|
@ -356,6 +347,12 @@ StaticAutoPtr<ComputedTimingFunction> gZoomAnimationFunction;
|
|||
*/
|
||||
StaticAutoPtr<ComputedTimingFunction> gVelocityCurveFunction;
|
||||
|
||||
/**
|
||||
* The estimated duration of a paint for the purposes of calculating a new
|
||||
* displayport, in milliseconds.
|
||||
*/
|
||||
static const double kDefaultEstimatedPaintDurationMs = 50;
|
||||
|
||||
/**
|
||||
* Returns true if this is a high memory system and we can use
|
||||
* extra memory for a larger displayport to reduce checkerboarding.
|
||||
|
@ -2695,8 +2692,7 @@ RedistributeDisplayPortExcess(CSSSize& aDisplayPortSize,
|
|||
/* static */
|
||||
const ScreenMargin AsyncPanZoomController::CalculatePendingDisplayPort(
|
||||
const FrameMetrics& aFrameMetrics,
|
||||
const ParentLayerPoint& aVelocity,
|
||||
double aEstimatedPaintDuration)
|
||||
const ParentLayerPoint& aVelocity)
|
||||
{
|
||||
if (aFrameMetrics.IsScrollInfoLayer()) {
|
||||
// Don't compute margins. Since we can't asynchronously scroll this frame,
|
||||
|
@ -2718,8 +2714,7 @@ const ScreenMargin AsyncPanZoomController::CalculatePendingDisplayPort(
|
|||
|
||||
// Offset the displayport, depending on how fast we're moving and the
|
||||
// estimated time it takes to paint, to try to minimise checkerboarding.
|
||||
float estimatedPaintDurationMillis = (float)(aEstimatedPaintDuration * 1000.0);
|
||||
float paintFactor = (gfxPrefs::APZUsePaintDuration() ? estimatedPaintDurationMillis : 50.0f);
|
||||
float paintFactor = kDefaultEstimatedPaintDurationMs;
|
||||
CSSRect displayPort = CSSRect(scrollOffset + (velocity * paintFactor * gfxPrefs::APZVelocityBias()),
|
||||
displayPortSize);
|
||||
|
||||
|
@ -2831,10 +2826,7 @@ void AsyncPanZoomController::RequestContentRepaint() {
|
|||
}
|
||||
|
||||
void AsyncPanZoomController::RequestContentRepaint(FrameMetrics& aFrameMetrics, bool aThrottled) {
|
||||
aFrameMetrics.SetDisplayPortMargins(
|
||||
CalculatePendingDisplayPort(aFrameMetrics,
|
||||
GetVelocityVector(),
|
||||
mPaintThrottler->AverageDuration().ToSeconds()));
|
||||
aFrameMetrics.SetDisplayPortMargins(CalculatePendingDisplayPort(aFrameMetrics, GetVelocityVector()));
|
||||
aFrameMetrics.SetUseDisplayPortMargins();
|
||||
|
||||
// If we're trying to paint what we already think is painted, discard this
|
||||
|
@ -3197,7 +3189,7 @@ void AsyncPanZoomController::NotifyLayersUpdated(const FrameMetrics& aLayerMetri
|
|||
// Initialize our internal state to something sane when the content
|
||||
// that was just painted is something we knew nothing about previously
|
||||
mPaintThrottler->ClearHistory();
|
||||
mPaintThrottler->SetMaxDurations(gfxPrefs::APZNumPaintDurationSamples());
|
||||
mPaintThrottler->SetMaxDurations(1);
|
||||
|
||||
CancelAnimation();
|
||||
|
||||
|
@ -3445,9 +3437,7 @@ void AsyncPanZoomController::ZoomToRect(CSSRect aRect) {
|
|||
|
||||
endZoomToMetrics.SetScrollOffset(aRect.TopLeft());
|
||||
endZoomToMetrics.SetDisplayPortMargins(
|
||||
CalculatePendingDisplayPort(endZoomToMetrics,
|
||||
ParentLayerPoint(0,0),
|
||||
0));
|
||||
CalculatePendingDisplayPort(endZoomToMetrics, ParentLayerPoint(0,0)));
|
||||
endZoomToMetrics.SetUseDisplayPortMargins();
|
||||
|
||||
StartAnimation(new ZoomAnimation(
|
||||
|
|
|
@ -269,8 +269,7 @@ public:
|
|||
*/
|
||||
static const ScreenMargin CalculatePendingDisplayPort(
|
||||
const FrameMetrics& aFrameMetrics,
|
||||
const ParentLayerPoint& aVelocity,
|
||||
double aEstimatedPaintDuration);
|
||||
const ParentLayerPoint& aVelocity);
|
||||
|
||||
nsEventStatus HandleDragEvent(const MouseInput& aEvent,
|
||||
const AsyncDragMetrics& aDragMetrics);
|
||||
|
|
|
@ -167,7 +167,6 @@ private:
|
|||
DECL_GFX_PREF(Once, "apz.max_velocity_queue_size", APZMaxVelocityQueueSize, uint32_t, 5);
|
||||
DECL_GFX_PREF(Live, "apz.min_skate_speed", APZMinSkateSpeed, float, 1.0f);
|
||||
DECL_GFX_PREF(Live, "apz.minimap.enabled", APZMinimap, bool, false);
|
||||
DECL_GFX_PREF(Live, "apz.num_paint_duration_samples", APZNumPaintDurationSamples, int32_t, 3);
|
||||
DECL_GFX_PREF(Live, "apz.overscroll.enabled", APZOverscrollEnabled, bool, false);
|
||||
DECL_GFX_PREF(Live, "apz.overscroll.min_pan_distance_ratio", APZMinPanDistanceRatio, float, 1.0f);
|
||||
DECL_GFX_PREF(Live, "apz.overscroll.spring_friction", APZOverscrollSpringFriction, float, 0.015f);
|
||||
|
@ -181,7 +180,6 @@ private:
|
|||
DECL_GFX_PREF(Live, "apz.test.logging_enabled", APZTestLoggingEnabled, bool, false);
|
||||
DECL_GFX_PREF(Live, "apz.touch_move_tolerance", APZTouchMoveTolerance, float, 0.0);
|
||||
DECL_GFX_PREF(Live, "apz.touch_start_tolerance", APZTouchStartTolerance, float, 1.0f/4.5f);
|
||||
DECL_GFX_PREF(Live, "apz.use_paint_duration", APZUsePaintDuration, bool, true);
|
||||
DECL_GFX_PREF(Live, "apz.velocity_bias", APZVelocityBias, float, 1.0f);
|
||||
DECL_GFX_PREF(Live, "apz.velocity_relevance_time_ms", APZVelocityRelevanceTime, uint32_t, 150);
|
||||
DECL_GFX_PREF(Live, "apz.x_skate_highmem_adjust", APZXSkateHighMemAdjust, float, 0.0f);
|
||||
|
|
|
@ -3000,7 +3000,7 @@ nsLayoutUtils::CalculateAndSetDisplayPortMargins(nsIScrollableFrame* aScrollFram
|
|||
|
||||
FrameMetrics metrics = CalculateBasicFrameMetrics(aScrollFrame);
|
||||
ScreenMargin displayportMargins = APZCTreeManager::CalculatePendingDisplayPort(
|
||||
metrics, ParentLayerPoint(0.0f, 0.0f), 0.0);
|
||||
metrics, ParentLayerPoint(0.0f, 0.0f));
|
||||
nsIPresShell* presShell = frame->PresContext()->GetPresShell();
|
||||
return nsLayoutUtils::SetDisplayPortMargins(
|
||||
content, presShell, displayportMargins, 0, aRepaintMode);
|
||||
|
|
|
@ -573,7 +573,6 @@ pref("apz.max_velocity_inches_per_ms", "-1.0");
|
|||
pref("apz.max_velocity_queue_size", 5);
|
||||
pref("apz.min_skate_speed", "1.0");
|
||||
pref("apz.minimap.enabled", false);
|
||||
pref("apz.num_paint_duration_samples", 3);
|
||||
pref("apz.overscroll.enabled", false);
|
||||
pref("apz.overscroll.min_pan_distance_ratio", "1.0");
|
||||
pref("apz.overscroll.spring_friction", "0.015");
|
||||
|
@ -590,7 +589,6 @@ pref("apz.smooth_scroll_repaint_interval", 16);
|
|||
pref("apz.test.logging_enabled", false);
|
||||
pref("apz.touch_start_tolerance", "0.1");
|
||||
pref("apz.touch_move_tolerance", "0.03");
|
||||
pref("apz.use_paint_duration", true);
|
||||
pref("apz.velocity_bias", "1.0");
|
||||
pref("apz.velocity_relevance_time_ms", 150);
|
||||
pref("apz.x_skate_highmem_adjust", "0.0");
|
||||
|
|
Загрузка…
Ссылка в новой задаче