Bug 982338 - Enable tiling for OSX 10.8. r=Bas

This commit is contained in:
Matt Woodrow 2014-07-25 12:49:45 +12:00
Родитель dcb0587996
Коммит 14ca0ef931
6 изменённых файлов: 19 добавлений и 1 удалений

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

@ -163,7 +163,7 @@ ClientLayerManager::CreateThebesLayerWithHint(ThebesLayerCreationHint aHint)
#ifdef MOZ_B2G
aHint == SCROLLABLE &&
#endif
gfxPrefs::LayersTilesEnabled() &&
gfxPlatform::GetPlatform()->UseTiling() &&
(AsShadowForwarder()->GetCompositorBackendType() == LayersBackend::LAYERS_OPENGL ||
AsShadowForwarder()->GetCompositorBackendType() == LayersBackend::LAYERS_D3D9 ||
AsShadowForwarder()->GetCompositorBackendType() == LayersBackend::LAYERS_D3D11)) {

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

@ -252,6 +252,8 @@ public:
virtual bool UseAcceleratedSkiaCanvas();
virtual void InitializeSkiaCacheLimits();
virtual bool UseTiling() { return gfxPrefs::LayersTilesEnabled(); }
void GetAzureBackendInfo(mozilla::widget::InfoObject &aObj) {
aObj.DefineProperty("AzureCanvasBackend", GetBackendName(mPreferredCanvasBackend));
aObj.DefineProperty("AzureSkiaAccelerated", UseAcceleratedSkiaCanvas());

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

@ -18,6 +18,7 @@
#include "mozilla/Preferences.h"
#include "qcms.h"
#include "gfx2DGlue.h"
#include "gfxPrefs.h"
#include <dlfcn.h>
@ -386,6 +387,16 @@ gfxPlatformMac::UseAcceleratedCanvas()
return nsCocoaFeatures::OnLionOrLater() && Preferences::GetBool("gfx.canvas.azure.accelerated", false);
}
bool
gfxPlatformMac::UseTiling()
{
if (gfxPrefs::LayersTilesForceEnabled()) {
return true;
}
// Tiling seems to be slow on 10.6 so disable it until we figure it out
return nsCocoaFeatures::OnLionOrLater() && gfxPlatform::UseTiling();
}
void
gfxPlatformMac::GetPlatformCMSOutputProfile(void* &mem, size_t &size)
{

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

@ -61,6 +61,8 @@ public:
bool UseAcceleratedCanvas();
virtual bool UseTiling() MOZ_OVERRIDE;
// lower threshold on font anti-aliasing
uint32_t GetAntiAliasingThreshold() { return mFontAntiAliasingThreshold; }

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

@ -237,6 +237,7 @@ private:
DECL_GFX_PREF(Live, "layers.effect.invert", LayersEffectInvert, bool, false);
DECL_GFX_PREF(Once, "layers.enable-tiles", LayersTilesEnabled, bool, false);
DECL_GFX_PREF(Once, "layers.force-enable-tiles", LayersTilesForceEnabled, bool, false);
DECL_GFX_PREF(Once, "layers.simple-tiles", LayersUseSimpleTiles, bool, false);
DECL_GFX_PREF(Once, "layers.force-per-tile-drawing", PerTileDrawing, bool, false);
DECL_GFX_PREF(Once, "layers.tiled-drawtarget.enabled", TiledDrawTargetEnabled, bool, false);

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

@ -3826,6 +3826,8 @@ pref("layers.offmainthreadcomposition.enabled", true);
#ifdef XP_MACOSX
pref("layers.offmainthreadcomposition.enabled", true);
pref("layers.enable-tiles", true);
pref("layers.tiled-drawtarget.enabled", true);
#endif
// ANDROID covers android and b2g