backing out changes that weren't supposed to be part of my previous backout...
backing out changes that weren't supposed to be part of my previous backout...
--- a/gfx/public/nsFont.h
+++ b/gfx/public/nsFont.h
@@ -92,19 +92,16 @@ struct NS_GFX nsFont {
nscoord size;
// The aspect-value (ie., the ratio actualsize:actualxheight) that any
// actual physical font created from this font structure must have when
// rendering or measuring a string. A value of 0 means no adjustment
// needs to be done.
float sizeAdjust;
- // Stretch of the font 1-9
- PRUint16 stretch;
-
// Initialize the font struct with an ASCII name
nsFont(const char* aName, PRUint8 aStyle, PRUint8 aVariant,
PRUint16 aWeight, PRUint8 aDecoration, nscoord aSize,
float aSizeAdjust=0.0f);
// Initialize the font struct with a (potentially) unicode name
nsFont(const nsString& aName, PRUint8 aStyle, PRUint8 aVariant,
PRUint16 aWeight, PRUint8 aDecoration, nscoord aSize,
--- a/gfx/src/thebes/nsThebesDeviceContext.cpp
+++ b/gfx/src/thebes/nsThebesDeviceContext.cpp
@@ -267,17 +267,20 @@ nsThebesDeviceContext::Init(nsNativeWidg
if (getenv ("MOZ_X_SYNC")) {
PR_LOG (gThebesGFXLog, PR_LOG_DEBUG, ("+++ Enabling XSynchronize\n"));
XSynchronize (gdk_x11_get_default_xdisplay(), True);
XSetErrorHandler(x11_error_handler);
}
#endif
- mScreenManager = do_GetService("@mozilla.org/gfx/screenmanager;1");
+
+ mDepth = 24;
+
+ mScreenManager = do_GetService("@mozilla.org/gfx/screenmanager;1");
return NS_OK;
}
NS_IMETHODIMP
nsThebesDeviceContext::CreateRenderingContext(nsIView *aView,
nsIRenderingContext *&aContext)
{
@@ -413,22 +416,16 @@ NS_IMETHODIMP
nsThebesDeviceContext::CheckFontExistence(const nsString& aFaceName)
{
return NS_OK;
}
NS_IMETHODIMP
nsThebesDeviceContext::GetDepth(PRUint32& aDepth)
{
- nsCOMPtr<nsIScreen> primaryScreen;
- if (mDepth == 0) {
- mScreenManager->GetPrimaryScreen(getter_AddRefs(primaryScreen));
- primaryScreen->GetColorDepth(reinterpret_cast<PRInt32 *>(&mDepth));
- }
-
aDepth = mDepth;
return NS_OK;
}
NS_IMETHODIMP
nsThebesDeviceContext::GetPaletteInfo(nsPaletteInfo& aPaletteInfo)
{
aPaletteInfo.isPaletteDevice = PR_FALSE;