backing out changes that weren't supposed to be part of my previous backout...
authorpavlov@pavlov.net
Wed, 26 Mar 2008 14:13:32 -0700
changeset 13576 76ce3eddd7b8639ebf40c97b3d38841adb619620
parent 13575 634491129642106501f43231e6fbf5583e74010f
child 13577 7b015ac5bcd4b3e16d078b890c2251e3bc5b3122
push idunknown
push userunknown
push dateunknown
milestone1.9pre
backing out changes that weren't supposed to be part of my previous backout...
gfx/public/nsFont.h
gfx/src/thebes/nsThebesDeviceContext.cpp
--- 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;