Bug 719776 - Remove external dependencies from Azure. r=Bas
☠☠ backed out by a0f2f7fd9dce ☠ ☠
authorMatt Woodrow <mwoodrow@mozilla.com>
Mon, 12 Mar 2012 15:00:57 +1300
changeset 91656 c891149d1ca46d94e7a20d94b5ca11580a72ab64
parent 91641 c9612c1006f658d3c16e909c5670d98e236aed54
child 91657 f621a747531a6f52f05841ad3110dce3e10bbfb0
push id783
push userlsblakk@mozilla.com
push dateTue, 24 Apr 2012 17:33:42 +0000
treeherdermozilla-beta@11faed19f136 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersBas
bugs719776
milestone13.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 - Remove external dependencies from Azure. r=Bas
gfx/2d/DrawTargetSkia.cpp
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.cpp
+++ b/gfx/2d/DrawTargetSkia.cpp
@@ -320,17 +320,19 @@ struct AutoPaintSetup {
 
     //TODO: Can we set greyscale somehow?
     if (aOptions.mAntialiasMode != AA_NONE) {
       mPaint.setAntiAlias(true);
     } else {
       mPaint.setAntiAlias(false);
     }
 
-    NS_ASSERTION(aOptions.mSnapping == SNAP_NONE, "Pixel snapping not supported yet!");
+    if (aOptions.mSnapping != SNAP_NONE) {
+      gfxDebug() << "Pixel snapping not supported yet!";
+    }
     
     // TODO: We could skip the temporary for operator_source and just
     // clear the clip rect. The other operators would be harder
     // but could be worth it to skip pushing a group.
     if (!IsOperatorBoundByMask(aOptions.mCompositionOp)) {
       mPaint.setXfermodeMode(SkXfermode::kSrcOver_Mode);
       SkPaint temp;
       temp.setXfermodeMode(GfxOpToSkiaOp(aOptions.mCompositionOp));
--- 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
 {
@@ -132,14 +131,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
@@ -147,17 +147,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
@@ -720,17 +720,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(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)