mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 783368 - Add a pref to control low precision tile rendering. r=bgirard
Add pref 'layers.low-precision-buffer', enabled on mobile/android.
This commit is contained in:
parent
f15533b7e5
commit
fba6244af3
@ -591,7 +591,8 @@ BasicTiledThebesLayer::PaintThebes(gfxContext* aContext,
|
||||
// If we have a critical display-port defined, render the full display-port
|
||||
// progressively in the low-precision tiled buffer.
|
||||
bool updatedLowPrecision = false;
|
||||
if (!criticalDisplayPort.IsEmpty() &&
|
||||
if (gfxPlatform::UseLowPrecisionBuffer() &&
|
||||
!criticalDisplayPort.IsEmpty() &&
|
||||
!nsIntRegion(layerDisplayPort).Contains(mVisibleRegion)) {
|
||||
nsIntRegion oldValidRegion = mLowPrecisionTiledBuffer.GetValidRegion();
|
||||
oldValidRegion.And(oldValidRegion, mVisibleRegion);
|
||||
|
@ -1246,6 +1246,22 @@ gfxPlatform::UseProgressiveTilePainting()
|
||||
return sUseProgressiveTilePainting;
|
||||
}
|
||||
|
||||
bool
|
||||
gfxPlatform::UseLowPrecisionBuffer()
|
||||
{
|
||||
static bool sUseLowPrecisionBuffer;
|
||||
static bool sUseLowPrecisionBufferPrefCached = false;
|
||||
|
||||
if (!sUseLowPrecisionBufferPrefCached) {
|
||||
sUseLowPrecisionBufferPrefCached = true;
|
||||
mozilla::Preferences::AddBoolVarCache(&sUseLowPrecisionBuffer,
|
||||
"layers.low-precision-buffer",
|
||||
false);
|
||||
}
|
||||
|
||||
return sUseLowPrecisionBuffer;
|
||||
}
|
||||
|
||||
bool
|
||||
gfxPlatform::UseReusableTileStore()
|
||||
{
|
||||
|
@ -405,6 +405,10 @@ public:
|
||||
// Break large OMTC tiled thebes layer painting into small paints.
|
||||
static bool UseProgressiveTilePainting();
|
||||
|
||||
// When a critical display-port is set, render the visible area outside of
|
||||
// it into a buffer at a lower precision. Requires tiled buffers.
|
||||
static bool UseLowPrecisionBuffer();
|
||||
|
||||
// Retain some invalid tiles when the valid region of a layer changes and
|
||||
// excludes previously valid tiles.
|
||||
static bool UseReusableTileStore();
|
||||
|
@ -523,6 +523,7 @@ pref("layers.acceleration.disabled", false);
|
||||
pref("layers.offmainthreadcomposition.enabled", true);
|
||||
pref("layers.async-video.enabled", true);
|
||||
pref("layers.progressive-paint", true);
|
||||
pref("layers.low-precision-buffer", true);
|
||||
|
||||
pref("notification.feature.enabled", true);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user