Bug 622838: Use the right rect-rounding mode to avoid accidentally resampling resolution-scaled ThebesLayer textures. r=jrmuizel a=b
This commit is contained in:
@@ -468,8 +468,13 @@ nsACString&
|
|||||||
ContainerLayer::PrintInfo(nsACString& aTo, const char* aPrefix)
|
ContainerLayer::PrintInfo(nsACString& aTo, const char* aPrefix)
|
||||||
{
|
{
|
||||||
Layer::PrintInfo(aTo, aPrefix);
|
Layer::PrintInfo(aTo, aPrefix);
|
||||||
return mFrameMetrics.IsDefault() ?
|
if (!mFrameMetrics.IsDefault()) {
|
||||||
aTo : AppendToString(aTo, mFrameMetrics, " [metrics=", "]");
|
AppendToString(aTo, mFrameMetrics, " [metrics=", "]");
|
||||||
|
}
|
||||||
|
if (UseIntermediateSurface()) {
|
||||||
|
aTo += " [usesTmpSurf]";
|
||||||
|
}
|
||||||
|
return aTo;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsACString&
|
nsACString&
|
||||||
|
|||||||
@@ -215,7 +215,7 @@ ThebesLayerBufferOGL::RenderTo(const nsIntPoint& aOffset,
|
|||||||
// the texture size and let GL do the rest.
|
// the texture size and let GL do the rest.
|
||||||
gfxRect sqr(quadRect.x, quadRect.y, quadRect.width, quadRect.height);
|
gfxRect sqr(quadRect.x, quadRect.y, quadRect.width, quadRect.height);
|
||||||
sqr.Scale(xres, yres);
|
sqr.Scale(xres, yres);
|
||||||
sqr.RoundOut();
|
sqr.Round();
|
||||||
nsIntRect scaledQuadRect(sqr.pos.x, sqr.pos.y, sqr.size.width, sqr.size.height);
|
nsIntRect scaledQuadRect(sqr.pos.x, sqr.pos.y, sqr.size.width, sqr.size.height);
|
||||||
|
|
||||||
BindAndDrawQuadWithTextureRect(gl(), program, scaledQuadRect,
|
BindAndDrawQuadWithTextureRect(gl(), program, scaledQuadRect,
|
||||||
|
|||||||
Reference in New Issue
Block a user