mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 20:05:49 +00:00
Bug 944938 - Move the layers.async-pan-zoom.enabled pref to gfxPrefs and make it override the apz subframe pref when false. r=kats
This commit is contained in:
parent
77db589b6c
commit
7e5c225100
@ -61,6 +61,7 @@
|
||||
#include "TabChild.h"
|
||||
#include "LoadContext.h"
|
||||
#include "nsNetCID.h"
|
||||
#include "gfxPrefs.h"
|
||||
#include <algorithm>
|
||||
|
||||
using namespace mozilla::dom;
|
||||
@ -1888,9 +1889,7 @@ bool
|
||||
TabParent::UseAsyncPanZoom()
|
||||
{
|
||||
bool usingOffMainThreadCompositing = !!CompositorParent::CompositorLoop();
|
||||
bool asyncPanZoomEnabled =
|
||||
Preferences::GetBool("layers.async-pan-zoom.enabled", false);
|
||||
return (usingOffMainThreadCompositing && asyncPanZoomEnabled &&
|
||||
return (usingOffMainThreadCompositing && gfxPrefs::AsyncPanZoomEnabled() &&
|
||||
GetScrollingBehavior() == ASYNC_PAN_ZOOM);
|
||||
}
|
||||
|
||||
|
@ -169,6 +169,7 @@ private:
|
||||
DECL_GFX_PREF(Once, "layers.acceleration.force-enabled", LayersAccelerationForceEnabled, bool, false);
|
||||
DECL_GFX_PREF(Once, "layers.async-video.enabled", AsyncVideoEnabled, bool, false);
|
||||
DECL_GFX_PREF(Once, "layers.async-video-oop.enabled", AsyncVideoOOPEnabled, bool, false);
|
||||
DECL_GFX_PREF(Once, "layers.async-pan-zoom.enabled", AsyncPanZoomEnabled, bool, false);
|
||||
DECL_GFX_PREF(Live, "layers.bench.enabled", LayersBenchEnabled, bool, false);
|
||||
DECL_GFX_PREF(Once, "layers.bufferrotation.enabled", BufferRotationEnabled, bool, true);
|
||||
#ifdef MOZ_GFX_OPTIMIZE_MOBILE
|
||||
|
@ -6655,14 +6655,15 @@ nsLayoutUtils::CalculateExpandedScrollableRect(nsIFrame* aFrame)
|
||||
/* static */ bool
|
||||
nsLayoutUtils::WantSubAPZC()
|
||||
{
|
||||
// TODO Turn this on for inprocess OMTC on all platforms
|
||||
bool wantSubAPZC = gfxPrefs::APZSubframeEnabled();
|
||||
// TODO Turn this on for inprocess OMTC on all platforms
|
||||
bool wantSubAPZC = gfxPrefs::AsyncPanZoomEnabled() &&
|
||||
gfxPrefs::APZSubframeEnabled();
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
if (XRE_GetProcessType() != GeckoProcessType_Content) {
|
||||
wantSubAPZC = false;
|
||||
}
|
||||
if (XRE_GetProcessType() != GeckoProcessType_Content) {
|
||||
wantSubAPZC = false;
|
||||
}
|
||||
#endif
|
||||
return wantSubAPZC;
|
||||
return wantSubAPZC;
|
||||
}
|
||||
|
||||
/* static */ void
|
||||
|
@ -1020,9 +1020,7 @@ MetroWidget::ShouldUseBasicManager()
|
||||
bool
|
||||
MetroWidget::ShouldUseAPZC()
|
||||
{
|
||||
const char* kPrefName = "layers.async-pan-zoom.enabled";
|
||||
return ShouldUseOffMainThreadCompositing() &&
|
||||
Preferences::GetBool(kPrefName, false);
|
||||
return gfxPrefs::AsyncPanZoomEnabled();
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user