mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 03:45:46 +00:00
Bug 771219 - Added a pref for progressive painting. r=ajuma
This commit is contained in:
parent
a8ab8cd794
commit
fcd43f3bee
@ -227,9 +227,7 @@ BasicTiledThebesLayer::PaintThebes(gfxContext* aContext,
|
||||
if (regionToPaint.IsEmpty())
|
||||
return;
|
||||
|
||||
bool useProgressivePaint = true;
|
||||
|
||||
if (useProgressivePaint) {
|
||||
if (gfxPlatform::UseProgressiveTilePainting()) {
|
||||
nsIntRegionRectIterator it(regionToPaint);
|
||||
const nsIntRect* rect = it.Next();
|
||||
if (!rect)
|
||||
|
@ -1080,6 +1080,22 @@ gfxPlatform::AppendPrefLang(eFontPrefLang aPrefLangs[], PRUint32& aLen, eFontPre
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
gfxPlatform::UseProgressiveTilePainting()
|
||||
{
|
||||
static bool sUseProgressiveTilePainting;
|
||||
static bool sUseProgressiveTilePaintingPrefCached = false;
|
||||
|
||||
if (!sUseProgressiveTilePaintingPrefCached) {
|
||||
sUseProgressiveTilePaintingPrefCached = true;
|
||||
mozilla::Preferences::AddBoolVarCache(&sUseProgressiveTilePainting,
|
||||
"layers.progressive-paint",
|
||||
true);
|
||||
}
|
||||
|
||||
return sUseProgressiveTilePainting;
|
||||
}
|
||||
|
||||
bool
|
||||
gfxPlatform::UseAzureContentDrawing()
|
||||
{
|
||||
@ -1088,7 +1104,7 @@ gfxPlatform::UseAzureContentDrawing()
|
||||
|
||||
if (!sAzureContentDrawingPrefCached) {
|
||||
sAzureContentDrawingPrefCached = true;
|
||||
mozilla::Preferences::AddBoolVarCache(&sAzureContentDrawingEnabled,
|
||||
mozilla::Preferences::AddBoolVarCache(&sAzureContentDrawingEnabled,
|
||||
"gfx.content.azure.enabled");
|
||||
}
|
||||
|
||||
|
@ -368,6 +368,9 @@ public:
|
||||
// platform-specific override, by default do nothing
|
||||
}
|
||||
|
||||
// Break large OMTC tiled thebes layer painting into small paints.
|
||||
static bool UseProgressiveTilePainting();
|
||||
|
||||
// helper method to indicate if we want to use Azure content drawing
|
||||
static bool UseAzureContentDrawing();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user