зеркало из https://github.com/mozilla/gecko-dev.git
Backout of bug 1208636 due to it causing large black areas on long pages (bug 1210411). rs=kats
This commit is contained in:
Родитель
3170cfbdab
Коммит
7726e7e3d1
|
@ -6,13 +6,11 @@
|
||||||
#include "APZCTreeManager.h"
|
#include "APZCTreeManager.h"
|
||||||
#include "AsyncPanZoomController.h"
|
#include "AsyncPanZoomController.h"
|
||||||
#include "Compositor.h" // for Compositor
|
#include "Compositor.h" // for Compositor
|
||||||
#include "gfxPrefs.h" // for gfxPrefs
|
|
||||||
#include "HitTestingTreeNode.h" // for HitTestingTreeNode
|
#include "HitTestingTreeNode.h" // for HitTestingTreeNode
|
||||||
#include "InputBlockState.h" // for InputBlockState
|
#include "InputBlockState.h" // for InputBlockState
|
||||||
#include "InputData.h" // for InputData, etc
|
#include "InputData.h" // for InputData, etc
|
||||||
#include "Layers.h" // for Layer, etc
|
#include "Layers.h" // for Layer, etc
|
||||||
#include "mozilla/dom/Touch.h" // for Touch
|
#include "mozilla/dom/Touch.h" // for Touch
|
||||||
#include "mozilla/gfx/Logging.h" // for gfx::TreeLog
|
|
||||||
#include "mozilla/gfx/Point.h" // for Point
|
#include "mozilla/gfx/Point.h" // for Point
|
||||||
#include "mozilla/layers/APZThreadUtils.h" // for AssertOnCompositorThread, etc
|
#include "mozilla/layers/APZThreadUtils.h" // for AssertOnCompositorThread, etc
|
||||||
#include "mozilla/layers/AsyncCompositionManager.h" // for ViewTransform
|
#include "mozilla/layers/AsyncCompositionManager.h" // for ViewTransform
|
||||||
|
@ -26,12 +24,14 @@
|
||||||
#include "nsDebug.h" // for NS_WARNING
|
#include "nsDebug.h" // for NS_WARNING
|
||||||
#include "nsPoint.h" // for nsIntPoint
|
#include "nsPoint.h" // for nsIntPoint
|
||||||
#include "nsThreadUtils.h" // for NS_IsMainThread
|
#include "nsThreadUtils.h" // for NS_IsMainThread
|
||||||
|
#include "mozilla/gfx/Logging.h" // for gfx::TreeLog
|
||||||
|
#include "UnitTransforms.h" // for ViewAs
|
||||||
|
#include "gfxPrefs.h" // for gfxPrefs
|
||||||
#include "OverscrollHandoffState.h" // for OverscrollHandoffState
|
#include "OverscrollHandoffState.h" // for OverscrollHandoffState
|
||||||
#include "TaskThrottler.h" // for TaskThrottler
|
#include "TaskThrottler.h" // for TaskThrottler
|
||||||
#include "TreeTraversal.h" // for generic tree traveral algorithms
|
#include "TreeTraversal.h" // for generic tree traveral algorithms
|
||||||
#include "LayersLogging.h" // for Stringify
|
#include "LayersLogging.h" // for Stringify
|
||||||
#include "Units.h" // for ParentlayerPixel
|
#include "Units.h" // for ParentlayerPixel
|
||||||
#include "UnitTransforms.h" // for ViewAs
|
|
||||||
|
|
||||||
#define ENABLE_APZCTM_LOGGING 0
|
#define ENABLE_APZCTM_LOGGING 0
|
||||||
// #define ENABLE_APZCTM_LOGGING 1
|
// #define ENABLE_APZCTM_LOGGING 1
|
||||||
|
|
|
@ -63,7 +63,6 @@
|
||||||
#include "nsStyleStruct.h" // for nsTimingFunction
|
#include "nsStyleStruct.h" // for nsTimingFunction
|
||||||
#include "nsTArray.h" // for nsTArray, nsTArray_Impl, etc
|
#include "nsTArray.h" // for nsTArray, nsTArray_Impl, etc
|
||||||
#include "nsThreadUtils.h" // for NS_IsMainThread
|
#include "nsThreadUtils.h" // for NS_IsMainThread
|
||||||
#include "prsystem.h" // for PR_GetPhysicalMemorySize
|
|
||||||
#include "SharedMemoryBasic.h" // for SharedMemoryBasic
|
#include "SharedMemoryBasic.h" // for SharedMemoryBasic
|
||||||
#include "WheelScrollAnimation.h"
|
#include "WheelScrollAnimation.h"
|
||||||
|
|
||||||
|
@ -330,11 +329,6 @@ using mozilla::gfx::PointTyped;
|
||||||
* The multiplier we apply to the displayport size if it is not skating (see
|
* The multiplier we apply to the displayport size if it is not skating (see
|
||||||
* documentation for the skate size multipliers above).
|
* documentation for the skate size multipliers above).
|
||||||
*
|
*
|
||||||
* \li\b apz.x_skate_highmem_adjust
|
|
||||||
* \li\b apz.y_skate_highmem_adjust
|
|
||||||
* On high memory systems, we adjust the displayport during skating
|
|
||||||
* to be larger so we can reduce checkerboarding.
|
|
||||||
*
|
|
||||||
* \li\b apz.zoom_animation_duration_ms
|
* \li\b apz.zoom_animation_duration_ms
|
||||||
* This controls how long the zoom-to-rect animation takes.\n
|
* This controls how long the zoom-to-rect animation takes.\n
|
||||||
* Units: ms
|
* Units: ms
|
||||||
|
@ -350,16 +344,6 @@ StaticAutoPtr<ComputedTimingFunction> gZoomAnimationFunction;
|
||||||
*/
|
*/
|
||||||
StaticAutoPtr<ComputedTimingFunction> gVelocityCurveFunction;
|
StaticAutoPtr<ComputedTimingFunction> gVelocityCurveFunction;
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns true if this is a high memory system and we can use
|
|
||||||
* extra memory for a larger displayport to reduce checkerboarding.
|
|
||||||
*/
|
|
||||||
static bool gIsHighMemSystem = false;
|
|
||||||
static bool IsHighMemSystem()
|
|
||||||
{
|
|
||||||
return gIsHighMemSystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Maximum zoom amount, always used, even if a page asks for higher.
|
* Maximum zoom amount, always used, even if a page asks for higher.
|
||||||
*/
|
*/
|
||||||
|
@ -818,10 +802,6 @@ AsyncPanZoomController::InitializeGlobalState()
|
||||||
gfxPrefs::APZCurveFunctionX2(),
|
gfxPrefs::APZCurveFunctionX2(),
|
||||||
gfxPrefs::APZCurveFunctionY2()));
|
gfxPrefs::APZCurveFunctionY2()));
|
||||||
ClearOnShutdown(&gVelocityCurveFunction);
|
ClearOnShutdown(&gVelocityCurveFunction);
|
||||||
|
|
||||||
uint64_t sysmem = PR_GetPhysicalMemorySize();
|
|
||||||
uint64_t threshold = 1LL << 32; // 4 GB in bytes
|
|
||||||
gIsHighMemSystem = sysmem >= threshold;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
AsyncPanZoomController::AsyncPanZoomController(uint64_t aLayersId,
|
AsyncPanZoomController::AsyncPanZoomController(uint64_t aLayersId,
|
||||||
|
@ -2448,11 +2428,6 @@ CalculateDisplayPortSize(const CSSSize& aCompositionSize,
|
||||||
? gfxPrefs::APZYStationarySizeMultiplier()
|
? gfxPrefs::APZYStationarySizeMultiplier()
|
||||||
: gfxPrefs::APZYSkateSizeMultiplier();
|
: gfxPrefs::APZYSkateSizeMultiplier();
|
||||||
|
|
||||||
if (IsHighMemSystem()) {
|
|
||||||
xMultiplier += gfxPrefs::APZXSkateHighMemAdjust();
|
|
||||||
yMultiplier += gfxPrefs::APZYSkateHighMemAdjust();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Ensure that it is at least as large as the visible area inflated by the
|
// Ensure that it is at least as large as the visible area inflated by the
|
||||||
// danger zone. If this is not the case then the "AboutToCheckerboard"
|
// danger zone. If this is not the case then the "AboutToCheckerboard"
|
||||||
// function in TiledContentClient.cpp will return true even in the stable
|
// function in TiledContentClient.cpp will return true even in the stable
|
||||||
|
|
|
@ -185,10 +185,8 @@ private:
|
||||||
DECL_GFX_PREF(Live, "apz.velocity_bias", APZVelocityBias, float, 1.0f);
|
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.velocity_relevance_time_ms", APZVelocityRelevanceTime, uint32_t, 150);
|
||||||
DECL_GFX_PREF(Live, "apz.x_skate_size_multiplier", APZXSkateSizeMultiplier, float, 1.5f);
|
DECL_GFX_PREF(Live, "apz.x_skate_size_multiplier", APZXSkateSizeMultiplier, float, 1.5f);
|
||||||
DECL_GFX_PREF(Live, "apz.x_skate_highmem_adjust", APZXSkateHighMemAdjust, float, 0.0f);
|
|
||||||
DECL_GFX_PREF(Live, "apz.x_stationary_size_multiplier", APZXStationarySizeMultiplier, float, 3.0f);
|
DECL_GFX_PREF(Live, "apz.x_stationary_size_multiplier", APZXStationarySizeMultiplier, float, 3.0f);
|
||||||
DECL_GFX_PREF(Live, "apz.y_skate_size_multiplier", APZYSkateSizeMultiplier, float, 2.5f);
|
DECL_GFX_PREF(Live, "apz.y_skate_size_multiplier", APZYSkateSizeMultiplier, float, 2.5f);
|
||||||
DECL_GFX_PREF(Live, "apz.y_skate_highmem_adjust", APZYSkateHighMemAdjust, float, 0.0f);
|
|
||||||
DECL_GFX_PREF(Live, "apz.y_stationary_size_multiplier", APZYStationarySizeMultiplier, float, 3.5f);
|
DECL_GFX_PREF(Live, "apz.y_stationary_size_multiplier", APZYStationarySizeMultiplier, float, 3.5f);
|
||||||
DECL_GFX_PREF(Live, "apz.zoom_animation_duration_ms", APZZoomAnimationDuration, int32_t, 250);
|
DECL_GFX_PREF(Live, "apz.zoom_animation_duration_ms", APZZoomAnimationDuration, int32_t, 250);
|
||||||
|
|
||||||
|
|
|
@ -588,8 +588,6 @@ pref("apz.smooth_scroll_repaint_interval", 16);
|
||||||
pref("apz.pan_repaint_interval", 16);
|
pref("apz.pan_repaint_interval", 16);
|
||||||
pref("apz.x_skate_size_multiplier", "2.5");
|
pref("apz.x_skate_size_multiplier", "2.5");
|
||||||
pref("apz.y_skate_size_multiplier", "3.5");
|
pref("apz.y_skate_size_multiplier", "3.5");
|
||||||
pref("apz.x_skate_highmem_adjust", "1.0");
|
|
||||||
pref("apz.y_skate_highmem_adjust", "2.5");
|
|
||||||
#else
|
#else
|
||||||
// Mobile prefs
|
// Mobile prefs
|
||||||
pref("apz.fling_repaint_interval", 75);
|
pref("apz.fling_repaint_interval", 75);
|
||||||
|
@ -597,8 +595,6 @@ pref("apz.smooth_scroll_repaint_interval", 75);
|
||||||
pref("apz.pan_repaint_interval", 250);
|
pref("apz.pan_repaint_interval", 250);
|
||||||
pref("apz.x_skate_size_multiplier", "1.5");
|
pref("apz.x_skate_size_multiplier", "1.5");
|
||||||
pref("apz.y_skate_size_multiplier", "2.5");
|
pref("apz.y_skate_size_multiplier", "2.5");
|
||||||
pref("apz.x_skate_highmem_adjust", "0.0");
|
|
||||||
pref("apz.y_skate_highmem_adjust", "0.0");
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// APZ testing (bug 961289)
|
// APZ testing (bug 961289)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче