mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 04:15:43 +00:00
Bug 934860 - Part 6: Add a pref to disable single rect painting and disable it for now for causing TART regressions. r=jrmuziel
This commit is contained in:
parent
9ec181130a
commit
e5d0e79c1e
@ -3316,9 +3316,19 @@ FrameLayerBuilder::PaintItems(nsTArray<ClippedDisplayItem>& aItems,
|
||||
*/
|
||||
static bool ShouldDrawRectsSeparately(gfxContext* aContext, DrawRegionClip aClip)
|
||||
{
|
||||
if (aContext->IsCairo() || aClip == CLIP_NONE) {
|
||||
static bool sPaintRectsSeparately;
|
||||
static bool sPaintRectsSeparatelyPrefCached = false;
|
||||
if (!sPaintRectsSeparatelyPrefCached) {
|
||||
Preferences::AddBoolVarCache(&sPaintRectsSeparately, "layout.paint_rects_separately", false);
|
||||
sPaintRectsSeparatelyPrefCached = true;
|
||||
}
|
||||
|
||||
if (!sPaintRectsSeparately ||
|
||||
aContext->IsCairo() ||
|
||||
aClip == CLIP_NONE) {
|
||||
return false;
|
||||
}
|
||||
|
||||
DrawTarget *dt = aContext->GetDrawTarget();
|
||||
return dt->GetType() == BACKEND_DIRECT2D;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user