Back out c891149d1ca4 (bug 719776) for Windows build bustage

This commit is contained in:
Phil Ringnalda 2012-03-11 19:25:16 -07:00
parent 49bb21ce6d
commit c4f2e41c4e
7 changed files with 12 additions and 12 deletions

View File

@ -325,9 +325,7 @@ struct AutoPaintSetup {
mPaint.setAntiAlias(false);
}
if (aOptions.mSnapping != SNAP_NONE) {
gfxDebug() << "Pixel snapping not supported yet!";
}
NS_ASSERTION(aOptions.mSnapping == SNAP_NONE, "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

View File

@ -44,6 +44,7 @@
#include <sstream>
#include <vector>
using namespace std;
#include "gfxImageSurface.h"
namespace mozilla {
namespace gfx {
@ -136,6 +137,7 @@ private:
SkBitmap mBitmap;
SkRefPtr<SkCanvas> mCanvas;
SkRefPtr<SkDevice> mDevice;
nsRefPtr<gfxImageSurface> mImageSurface;
vector<SourceSurfaceSkia*> mSnapshots;
};

View File

@ -152,7 +152,7 @@ Factory::CreateScaledFontForNativeFont(const NativeFont &aNativeFont, Float aSiz
#ifdef WIN32
case NATIVE_FONT_GDI_FONT_FACE:
{
return new ScaledFontWin(static_cast<LOGFONT*>(aNativeFont.mFont), aSize);
return new ScaledFontWin(static_cast<gfxGDIFont*>(aNativeFont.mFont), aSize);
}
#endif
case NATIVE_FONT_SKIA_FONT_FACE:

View File

@ -37,6 +37,8 @@
#include "ScaledFontBase.h"
#include "gfxFont.h"
#ifdef USE_SKIA
#include "PathSkia.h"
#include "skia/SkPaint.h"

View File

@ -45,10 +45,11 @@
namespace mozilla {
namespace gfx {
ScaledFontWin::ScaledFontWin(LOGFONT* aFont, Float aSize)
ScaledFontWin::ScaledFontWin(gfxGDIFont* aFont, Float aSize)
: ScaledFontBase(aSize)
, mLogFont(*aFont)
{
LOGFONT lf;
GetObject(aFont->GetHFONT(), sizeof(LOGFONT), &lf);
}
#ifdef USE_SKIA

View File

@ -39,7 +39,7 @@
#define MOZILLA_GFX_SCALEDFONTWIN_H_
#include "ScaledFontBase.h"
#include <windows.h>
#include "gfxGDIFont.h"
namespace mozilla {
namespace gfx {
@ -47,7 +47,7 @@ namespace gfx {
class ScaledFontWin : public ScaledFontBase
{
public:
ScaledFontWin(LOGFONT* aFont, Float aSize);
ScaledFontWin(gfxGDIFont* aFont, Float aSize);
virtual FontType GetType() const { return FONT_GDI; }
#ifdef USE_SKIA
@ -57,7 +57,6 @@ private:
#ifdef USE_SKIA
friend class DrawTargetSkia;
#endif
LOGFONT mLogFont;
};
}

View File

@ -725,9 +725,7 @@ gfxWindowsPlatform::GetScaledFontForFont(gfxFont *aFont)
NativeFont nativeFont;
nativeFont.mType = NATIVE_FONT_GDI_FONT_FACE;
LOGFONT lf;
GetObject(aFont->GetHFONT(), sizeof(LOGFONT), &lf);
nativeFont.mFont = &lf;
nativeFont.mFont = aFont;
RefPtr<ScaledFont> scaledFont =
Factory::CreateScaledFontForNativeFont(nativeFont, aFont->GetAdjustedSize());