Bug 719776: Kill some external dependencies inside Azure code. r=Bas
☠☠ backed out by 1ef36ed1ae27 ☠ ☠
authorMatt Woodrow <mwoodrow@mozilla.com>
Mon, 05 Mar 2012 13:12:15 +1300
changeset 94240 690cba3bb817a6569decbcf005c6db2bfbae894d
parent 94239 5d82421a984d2acbeecf574c4c92a573e3b7caec
child 94241 afff429aaf9a8d999577293119167698e0197c20
child 94245 ff1c410a00f97e6e0a5b9a65878388ecc0f7661e
push id886
push userlsblakk@mozilla.com
push dateMon, 04 Jun 2012 19:57:52 +0000
treeherdermozilla-beta@bbd8d5efd6d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersBas
bugs719776
milestone14.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 719776: Kill some external dependencies inside Azure code. r=Bas
gfx/2d/DrawTargetSkia.h
gfx/2d/Factory.cpp
gfx/2d/ScaledFontBase.cpp
gfx/2d/ScaledFontWin.cpp
gfx/2d/ScaledFontWin.h
gfx/thebes/gfxWindowsPlatform.cpp
--- a/gfx/2d/DrawTargetSkia.h
+++ b/gfx/2d/DrawTargetSkia.h
@@ -39,17 +39,16 @@
 
 #include "skia/SkCanvas.h"
 #include "2D.h"
 #include "Rect.h"
 #include "PathSkia.h"
 #include <sstream>
 #include <vector>
 using namespace std;
-#include "gfxImageSurface.h"
 
 namespace mozilla {
 namespace gfx {
 
 class SourceSurfaceSkia;
 
 class DrawTargetSkia : public DrawTarget
 {
@@ -133,14 +132,13 @@ private:
   void RemoveSnapshot(SourceSurfaceSkia* aSnapshot);
 
   void MarkChanged();
 
   IntSize mSize;
   SkBitmap mBitmap;
   SkRefPtr<SkCanvas> mCanvas;
   SkRefPtr<SkDevice> mDevice;
-  nsRefPtr<gfxImageSurface> mImageSurface;
   vector<SourceSurfaceSkia*> mSnapshots;
 };
 
 }
 }
--- a/gfx/2d/Factory.cpp
+++ b/gfx/2d/Factory.cpp
@@ -175,17 +175,17 @@ Factory::CreateScaledFontForNativeFont(c
     {
       return new ScaledFontMac(static_cast<CGFontRef>(aNativeFont.mFont), aSize);
     }
 #endif
 #ifdef USE_SKIA
 #ifdef WIN32
   case NATIVE_FONT_GDI_FONT_FACE:
     {
-      return new ScaledFontWin(static_cast<gfxGDIFont*>(aNativeFont.mFont), aSize);
+      return new ScaledFontWin(static_cast<LOGFONT*>(aNativeFont.mFont), aSize);
     }
 #endif
   case NATIVE_FONT_SKIA_FONT_FACE:
     {
       return new ScaledFontFreetype(static_cast<gfxFont*>(aNativeFont.mFont), aSize);
     }
 #endif
 #ifdef USE_CAIRO
--- a/gfx/2d/ScaledFontBase.cpp
+++ b/gfx/2d/ScaledFontBase.cpp
@@ -32,18 +32,16 @@
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "ScaledFontBase.h"
 
-#include "gfxFont.h"
-
 #ifdef USE_SKIA
 #include "PathSkia.h"
 #include "skia/SkPaint.h"
 #include "skia/SkPath.h"
 #endif
 
 #ifdef USE_CAIRO
 #include "PathCairo.h"
--- a/gfx/2d/ScaledFontWin.cpp
+++ b/gfx/2d/ScaledFontWin.cpp
@@ -40,21 +40,20 @@
 
 #ifdef USE_SKIA
 #include "skia/SkTypeface_win.h"
 #endif
 
 namespace mozilla {
 namespace gfx {
 
-ScaledFontWin::ScaledFontWin(gfxGDIFont* aFont, Float aSize)
+ScaledFontWin::ScaledFontWin(LOGFONT* aFont, Float aSize)
   : ScaledFontBase(aSize)
+  , mLogFont(*aFont)
 {
-  LOGFONT lf;
-  GetObject(aFont->GetHFONT(), sizeof(LOGFONT), &lf);
 }
 
 #ifdef USE_SKIA
 SkTypeface* ScaledFontWin::GetSkTypeface()
 {
   if (!mTypeface) {
     mTypeface = SkCreateTypefaceFromLOGFONT(lf);
   }
--- a/gfx/2d/ScaledFontWin.h
+++ b/gfx/2d/ScaledFontWin.h
@@ -34,32 +34,33 @@
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #ifndef MOZILLA_GFX_SCALEDFONTWIN_H_
 #define MOZILLA_GFX_SCALEDFONTWIN_H_
 
 #include "ScaledFontBase.h"
-#include "gfxGDIFont.h"
+#include <windows.h>
 
 namespace mozilla {
 namespace gfx {
 
 class ScaledFontWin : public ScaledFontBase
 {
 public:
-  ScaledFontWin(gfxGDIFont* aFont, Float aSize);
+  ScaledFontWin(LOGFONT* aFont, Float aSize);
 
   virtual FontType GetType() const { return FONT_GDI; }
 #ifdef USE_SKIA
   virtual SkTypeface* GetSkTypeface();
 #endif
 private:
 #ifdef USE_SKIA
   friend class DrawTargetSkia;
 #endif
+  LOGFONT mLogFont;
 };
 
 }
 }
 
 #endif /* MOZILLA_GFX_SCALEDFONTWIN_H_ */
--- a/gfx/thebes/gfxWindowsPlatform.cpp
+++ b/gfx/thebes/gfxWindowsPlatform.cpp
@@ -726,17 +726,19 @@ gfxWindowsPlatform::GetScaledFontForFont
     RefPtr<ScaledFont> scaledFont =
       mozilla::gfx::Factory::CreateScaledFontForNativeFont(nativeFont, font->GetAdjustedSize());
 
     return scaledFont;
   }
 
   NativeFont nativeFont;
   nativeFont.mType = NATIVE_FONT_GDI_FONT_FACE;
-  nativeFont.mFont = aFont;
+  LOGFONT lf;
+  GetObject(static_cast<gfxGDIFont*>(aFont)->GetHFONT(), sizeof(LOGFONT), &lf);
+  nativeFont.mFont = &lf;
   RefPtr<ScaledFont> scaledFont =
     Factory::CreateScaledFontForNativeFont(nativeFont, aFont->GetAdjustedSize());
 
   return scaledFont;
 }
 
 already_AddRefed<gfxASurface>
 gfxWindowsPlatform::GetThebesSurfaceForDrawTarget(DrawTarget *aTarget)