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

--HG--
extra : rebase_source : c55a42c7e47413966cd5d67a3ae2eb65d142c860
This commit is contained in:
Matt Woodrow 2014-07-25 12:49:45 +12:00
parent febbddd2d3
commit c0fc65406d
6 changed files with 19 additions and 1 deletions

View File

@ -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)) {

View File

@ -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());

View File

@ -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)
{

View File

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

View File

@ -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);

View File

@ -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