Bug 1443314 - remove the svg.path-caching.enabled pref r=jwatt

This commit is contained in:
Robert Longson 2018-03-18 14:05:28 +00:00
Родитель b0b12232c4
Коммит 32c95b809e
5 изменённых файлов: 1 добавлений и 20 удалений

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

@ -320,7 +320,6 @@ const char* mozilla::dom::ContentPrefs::gEarlyPrefs[] = {
"svg.display-lists.hit-testing.enabled",
"svg.display-lists.painting.enabled",
"svg.new-getBBox.enabled",
"svg.path-caching.enabled",
"svg.transform-box.enabled",
"toolkit.asyncshutdown.crash_timeout",
"toolkit.asyncshutdown.log",

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

@ -111,10 +111,6 @@ SVGGeometryElement::GetOrBuildPath(const DrawTarget* aDrawTarget,
bool cacheable = aDrawTarget->GetBackendType() ==
gfxPlatform::GetPlatform()->GetDefaultContentBackend();
// Checking for and returning mCachedPath before checking the pref means
// that the pref is only live on page reload (or app restart for SVG in
// chrome). The benefit is that we avoid causing a CPU memory cache miss by
// looking at the global variable that the pref's stored in.
if (cacheable && mCachedPath && mCachedPath->GetFillRule() == aFillRule &&
aDrawTarget->GetBackendType() == mCachedPath->GetBackendType()) {
RefPtr<Path> path(mCachedPath);
@ -122,7 +118,7 @@ SVGGeometryElement::GetOrBuildPath(const DrawTarget* aDrawTarget,
}
RefPtr<PathBuilder> builder = aDrawTarget->CreatePathBuilder(aFillRule);
RefPtr<Path> path = BuildPath(builder);
if (cacheable && NS_SVGPathCachingEnabled()) {
if (cacheable) {
mCachedPath = path;
}
return path.forget();

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

@ -63,17 +63,10 @@ using namespace mozilla::dom::SVGUnitTypesBinding;
using namespace mozilla::gfx;
using namespace mozilla::image;
static bool sSVGPathCachingEnabled;
static bool sSVGDisplayListHitTestingEnabled;
static bool sSVGDisplayListPaintingEnabled;
static bool sSVGNewGetBBoxEnabled;
bool
NS_SVGPathCachingEnabled()
{
return sSVGPathCachingEnabled;
}
bool
NS_SVGDisplayListHitTestingEnabled()
{
@ -138,9 +131,6 @@ SVGAutoRenderState::IsPaintingToWindow(DrawTarget* aDrawTarget)
void
nsSVGUtils::Init()
{
Preferences::AddBoolVarCache(&sSVGPathCachingEnabled,
"svg.path-caching.enabled");
Preferences::AddBoolVarCache(&sSVGDisplayListHitTestingEnabled,
"svg.display-lists.hit-testing.enabled");

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

@ -71,7 +71,6 @@ class GeneralPattern;
#define SVG_HIT_TEST_CHECK_MRECT 0x04
bool NS_SVGPathCachingEnabled();
bool NS_SVGDisplayListHitTestingEnabled();
bool NS_SVGDisplayListPaintingEnabled();
bool NS_SVGNewGetBBoxEnabled();

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

@ -3423,9 +3423,6 @@ pref("browser.tabs.remote.separateFileUriProcess", true);
// content process, causes compatibility issues.
pref("browser.tabs.remote.allowLinkedWebInFileUriProcess", true);
// Enable caching of Moz2D Path objects for SVG geometry elements
pref("svg.path-caching.enabled", true);
// Enable the use of display-lists for SVG hit-testing and painting.
pref("svg.display-lists.hit-testing.enabled", true);
pref("svg.display-lists.painting.enabled", true);