зеркало из https://github.com/mozilla/pjs.git
Don't create huge surfaces. We need a surface big enough to hold our widget's
pixel dimensions, not twip dimensions. Bug 384266, r+sr=roc
This commit is contained in:
Родитель
cfff75470d
Коммит
a8c7df1be6
|
@ -662,6 +662,8 @@ nsNativeThemeGTK::DrawWidgetBackground(nsIRenderingContext* aContext,
|
||||||
|
|
||||||
gfxContext* ctx =
|
gfxContext* ctx =
|
||||||
(gfxContext*)aContext->GetNativeGraphicData(nsIRenderingContext::NATIVE_THEBES_CONTEXT);
|
(gfxContext*)aContext->GetNativeGraphicData(nsIRenderingContext::NATIVE_THEBES_CONTEXT);
|
||||||
|
|
||||||
|
// XXXbz do we really want to round here, then snap, then round again?
|
||||||
gfxRect rect(0, 0, NSAppUnitsToIntPixels(drawingRect.width, p2a),
|
gfxRect rect(0, 0, NSAppUnitsToIntPixels(drawingRect.width, p2a),
|
||||||
NSAppUnitsToIntPixels(drawingRect.height, p2a));
|
NSAppUnitsToIntPixels(drawingRect.height, p2a));
|
||||||
// Don't snap if it's a non-unit scale factor. We're going to have to take
|
// Don't snap if it's a non-unit scale factor. We're going to have to take
|
||||||
|
@ -679,7 +681,9 @@ nsNativeThemeGTK::DrawWidgetBackground(nsIRenderingContext* aContext,
|
||||||
ctx->SetMatrix(current);
|
ctx->SetMatrix(current);
|
||||||
} else {
|
} else {
|
||||||
renderer.Draw(gdk_x11_get_default_xdisplay(), ctx,
|
renderer.Draw(gdk_x11_get_default_xdisplay(), ctx,
|
||||||
drawingRect.width, drawingRect.height, rendererFlags, nsnull);
|
NSToIntCeil(NSAppUnitsToFloatPixels(drawingRect.width, p2a)),
|
||||||
|
NSToIntCeil(NSAppUnitsToFloatPixels(drawingRect.height, p2a)),
|
||||||
|
rendererFlags, nsnull);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!safeState) {
|
if (!safeState) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче