Bug 1059033 - Part 6: Clip text drawing to its bound so we can skip unaffected tiles. r=Bas

--HG--
extra : rebase_source : 60d0462767f625d91261b40b930ee165f0126173
This commit is contained in:
Matt Woodrow 2014-09-03 09:21:20 +12:00
Родитель 6a86816b2b
Коммит 050a6eabe8
2 изменённых файлов: 14 добавлений и 2 удалений

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

@ -4570,8 +4570,20 @@ nsDisplayText::Paint(nsDisplayListBuilder* aBuilder,
extraVisible.Inflate(appUnitsPerDevPixel, appUnitsPerDevPixel); extraVisible.Inflate(appUnitsPerDevPixel, appUnitsPerDevPixel);
nsTextFrame* f = static_cast<nsTextFrame*>(mFrame); nsTextFrame* f = static_cast<nsTextFrame*>(mFrame);
gfxContextAutoDisableSubpixelAntialiasing disable(aCtx->ThebesContext(), gfxContext* ctx = aCtx->ThebesContext();
gfxContextAutoDisableSubpixelAntialiasing disable(ctx,
mDisableSubpixelAA); mDisableSubpixelAA);
gfxContextAutoSaveRestore save(ctx);
gfxRect pixelVisible =
nsLayoutUtils::RectToGfxRect(extraVisible, appUnitsPerDevPixel);
pixelVisible.Inflate(2);
pixelVisible.RoundOut();
ctx->NewPath();
ctx->Rectangle(pixelVisible);
ctx->Clip();
NS_ASSERTION(mLeftEdge >= 0, "illegal left edge"); NS_ASSERTION(mLeftEdge >= 0, "illegal left edge");
NS_ASSERTION(mRightEdge >= 0, "illegal right edge"); NS_ASSERTION(mRightEdge >= 0, "illegal right edge");
f->PaintText(aCtx, ToReferenceFrame(), extraVisible, *this); f->PaintText(aCtx, ToReferenceFrame(), extraVisible, *this);

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

@ -1,6 +1,6 @@
skip-if(B2G&&browserIsRemote) HTTP == deferred-anchor.xhtml#d deferred-anchor-ref.xhtml#d skip-if(B2G&&browserIsRemote) HTTP == deferred-anchor.xhtml#d deferred-anchor-ref.xhtml#d
== deferred-anchor2.xhtml deferred-anchor-ref.xhtml#d == deferred-anchor2.xhtml deferred-anchor-ref.xhtml#d
HTTP == fixed-1.html fixed-1.html?ref ffuzzy-if(/^Windows\x20NT\x206\.2/.test(http.oscpu),1,4) HTTP == fixed-1.html fixed-1.html?ref
HTTP == fixed-opacity-1.html fixed-opacity-1.html?ref HTTP == fixed-opacity-1.html fixed-opacity-1.html?ref
skip-if(B2G) HTTP == fixed-opacity-2.html fixed-opacity-2.html?ref skip-if(B2G) HTTP == fixed-opacity-2.html fixed-opacity-2.html?ref
skip-if(B2G) random-if(gtk2Widget) fuzzy-if(Android,3,60) HTTP == fixed-text-1.html fixed-text-1.html?ref skip-if(B2G) random-if(gtk2Widget) fuzzy-if(Android,3,60) HTTP == fixed-text-1.html fixed-text-1.html?ref